Skip to content

Commit

Permalink
allow to specify libgmp location, by using --with-libgmp-prefix,
Browse files Browse the repository at this point in the history
	by default current prefix is also searched
allow to specify libb2 location, by using --with-bz2-prefix,
	by default current prefix is also searched
locating gmp and bz2 works by default on OpenBSD (bb Cisco-Talos#301)
move local m4 macros to m4/
import lib-link.m4 and dependent files
quoting for autoconf macros (bb Cisco-Talos#452)


git-svn: trunk@3566
  • Loading branch information
Török Edvin committed Jan 31, 2008
1 parent 7d39618 commit 6053d09
Show file tree
Hide file tree
Showing 26 changed files with 4,842 additions and 1,893 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Thu Jan 31 13:48:24 EET 2008 (edwin)
------------------------------------
* build system:
* allow to specify libgmp location, by using --with-libgmp-prefix,
by default current prefix is also searched
* allow to specify libb2 location, by using --with-bz2-prefix,
by default current prefix is also searched
* locating gmp and bz2 works by default on OpenBSD (bb #301)
* move local m4 macros to m4/
* import lib-link.m4 and dependent files
* quoting for autoconf macros (bb #452)

Wed Jan 30 23:13:19 EET 2008 (edwin)
------------------------------------
* configure.in,configure: fix quoting of version.
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.

ACLOCAL_AMFLAGS=-I m4
SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter test
EXTRA_DIST = FAQ examples BUGS shared libclamav.pc.in UPGRADE COPYING.bzip2 COPYING.lzma COPYING.unrar COPYING.LGPL COPYING.file

Expand Down
17 changes: 13 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(top_srcdir)/docs/man/freshclam.1.in \
$(top_srcdir)/docs/man/freshclam.conf.5.in \
$(top_srcdir)/docs/man/sigtool.1.in AUTHORS COPYING ChangeLog \
INSTALL NEWS config/config.guess config/config.sub \
config/depcomp config/install-sh config/ltmain.sh \
config/missing mkinstalldirs
INSTALL NEWS config/config.guess config/config.rpath \
config/config.sub config/depcomp config/install-sh \
config/ltmain.sh config/missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -149,18 +150,25 @@ EXEEXT = @EXEEXT@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GETENT = @GETENT@
GREP = @GREP@
HAVE_LIBGMP = @HAVE_LIBGMP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBGMP = @LIBGMP@
LIBGMP_PREFIX = @LIBGMP_PREFIX@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBBZ2 = @LTLIBBZ2@
LTLIBGMP = @LTLIBGMP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
Expand Down Expand Up @@ -236,6 +244,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libclamunrar libclamunrar_iface libclamav clamscan clamd clamdscan freshclam sigtool clamconf database docs etc clamav-milter test
EXTRA_DIST = FAQ examples BUGS shared libclamav.pc.in UPGRADE COPYING.bzip2 COPYING.lzma COPYING.unrar COPYING.LGPL COPYING.file
bin_SCRIPTS = clamav-config
Expand Down
115 changes: 114 additions & 1 deletion aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,117 @@ m4_if(m4_PACKAGE_VERSION, [2.61],,
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])

# lib-ld.m4 serial 3 (gettext-0.13)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

dnl Subroutines of libtool.m4,
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
dnl with libtool.m4.

dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
acl_cv_prog_gnu_ld=yes ;;
*)
acl_cv_prog_gnu_ld=no ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])

dnl From libtool-1.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[[\\/]* | [A-Za-z]:[\\/]*)]
[re_direlt='/[^/][^/]*/\.\./']
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(acl_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
*GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break ;;
*)
test "$with_gnu_ld" != yes && break ;;
esac
fi
done
IFS="$ac_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$acl_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_LIB_PROG_LD_GNU
])

# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-

# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
Expand Down Expand Up @@ -7441,4 +7552,6 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR

m4_include([acinclude.m4])
m4_include([m4/acinclude.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
6 changes: 3 additions & 3 deletions clamav-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE

/* have gmp installed */
#undef HAVE_GMP

/* Define to 1 if you have the <grp.h> header file. */
#undef HAVE_GRP_H

Expand All @@ -162,6 +159,9 @@
/* in_port_t is defined */
#undef HAVE_IN_PORT_T

/* Define if you have the gmp library. */
#undef HAVE_LIBGMP

/* Define to 1 if you have the <libmilter/mfapi.h> header file. */
#undef HAVE_LIBMILTER_MFAPI_H

Expand Down
10 changes: 9 additions & 1 deletion clamav-milter/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ target_triplet = @target@
subdir = clamav-milter
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -131,18 +132,25 @@ EXEEXT = @EXEEXT@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GETENT = @GETENT@
GREP = @GREP@
HAVE_LIBGMP = @HAVE_LIBGMP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBGMP = @LIBGMP@
LIBGMP_PREFIX = @LIBGMP_PREFIX@
LIBOBJS = @LIBOBJS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMAV_MILTER_LIBS@ @THREAD_LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBBZ2 = @LTLIBBZ2@
LTLIBGMP = @LTLIBGMP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
Expand Down
10 changes: 9 additions & 1 deletion clamconf/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ bin_PROGRAMS = clamconf$(EXEEXT)
subdir = clamconf
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -116,18 +117,25 @@ EXEEXT = @EXEEXT@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GETENT = @GETENT@
GREP = @GREP@
HAVE_LIBGMP = @HAVE_LIBGMP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBGMP = @LIBGMP@
LIBGMP_PREFIX = @LIBGMP_PREFIX@
LIBOBJS = @LIBOBJS@
LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBBZ2 = @LTLIBBZ2@
LTLIBGMP = @LTLIBGMP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
Expand Down
10 changes: 9 additions & 1 deletion clamd/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ target_triplet = @target@
subdir = clamd
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -136,18 +137,25 @@ EXEEXT = @EXEEXT@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GETENT = @GETENT@
GREP = @GREP@
HAVE_LIBGMP = @HAVE_LIBGMP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBGMP = @LIBGMP@
LIBGMP_PREFIX = @LIBGMP_PREFIX@
LIBOBJS = @LIBOBJS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBBZ2 = @LTLIBBZ2@
LTLIBGMP = @LTLIBGMP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
Expand Down
10 changes: 9 additions & 1 deletion clamdscan/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ target_triplet = @target@
subdir = clamdscan
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
Expand Down Expand Up @@ -125,18 +126,25 @@ EXEEXT = @EXEEXT@
FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
GETENT = @GETENT@
GREP = @GREP@
HAVE_LIBGMP = @HAVE_LIBGMP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBBZ2 = @LIBBZ2@
LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
LIBGMP = @LIBGMP@
LIBGMP_PREFIX = @LIBGMP_PREFIX@
LIBOBJS = @LIBOBJS@
LIBS = $(top_builddir)/libclamav/libclamav_internal_utils.la @FRESHCLAM_LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBBZ2 = @LTLIBBZ2@
LTLIBGMP = @LTLIBGMP@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
Expand Down
Loading

0 comments on commit 6053d09

Please sign in to comment.