From c72478ce90d83e355ad7782991d20cbbd2664fd3 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 9 May 2007 14:37:44 +0000 Subject: FreeBSD fixes - Autoconf: try to locate libraries in /usr/local - Autoconf: Help FreeBSD to locate BerkeleyDB - Autoconf: Search for dlopen in libc library - Autoconf: Support of --disable-bdb option is added to configure script - Fixed compilation with missing dlopen functionality - Suppress various warnings --- configure.in | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 013e9ae..1de9595 100644 --- a/configure.in +++ b/configure.in @@ -37,8 +37,12 @@ AC_ARG_ENABLE( libtranslate, [ --disable-libtranslate disable usage of libtranslate],, disable_libtranslate="yes") +AC_ARG_ENABLE( bdb, + [ --disable-bdb disable usage of berkeleydb for recodings caching],, + disable_bdb="yes") AC_PROG_CC +AM_PROG_CC_C_O AC_PROG_INSTALL AM_PROG_LIBTOOL @@ -53,7 +57,11 @@ AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) dnl Checks for header files. -AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR(Missing iconv header)]) +AC_CHECK_HEADERS(iconv.h,, [ + CFLAGS+=" -I/usr/local/include" + LIBS+=" -L/usr/local/lib" + AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR(Missing iconv header)]) +]) AC_CHECK_HEADERS(mntent.h pwd.h sys/types.h sys/stat.h sys/file.h sys/socket.h sys/un.h sys/time.h sys/select.h sys/wait.h signal.h unistd.h fcntl.h) AC_TRY_COMPILE([#include ], @@ -97,7 +105,12 @@ AC_CHECK_HEADER(dlfcn.h, [AC_CHECK_LIB(dl, dlopen, [ ],[ DLOPEN_LIBS="" DLOPEN_INCLUDES="" - HAVE_DLOPEN=no + + AC_CHECK_FUNCS(dlopen, [ + HAVE_DLOPEN=yes + ],[ + HAVE_DLOPEN=no + ]) ])]) RCD_LIBS="" @@ -151,15 +164,21 @@ AC_SUBST(DLOPEN_LIBS) AC_SUBST(DLOPEN_INCLUDES) -AX_PATH_BDB([4],[ - BDB_LIBS="$BDB_LDFLAGS $BDB_LIBS" - BDB_INCLUDES="$BDB_CPPFLAGS" - HAVE_BDB=yes -],[ +if test "x$disable_bdb" != "xyes"; then BDB_LIBS="" BDB_INCLUDES="" HAVE_BDB=no -]) +else + AX_PATH_BDB([4],[ + BDB_LIBS="$BDB_LDFLAGS $BDB_LIBS" + BDB_INCLUDES="$BDB_CPPFLAGS" + HAVE_BDB=yes + ],[ + BDB_LIBS="" + BDB_INCLUDES="" + HAVE_BDB=no + ]) +fi AC_SUBST(BDB_LIBS) AC_SUBST(BDB_INCLUDES) -- cgit v1.2.3