X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0a044ac4dc4a14982ffdf301c137b415cae00298..092ae175f070124ba0857429609e5613a4606934:/configure.in diff --git a/configure.in b/configure.in index a9b7275f2..b975031e5 100644 --- a/configure.in +++ b/configure.in @@ -12,12 +12,13 @@ dnl not used but STL is. dnl 'make -f Makefile startup' will generate the configure file from dnl configure.in correctly and can be run at any time +AC_PREREQ(2.50) AC_INIT(configure.in) AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.5.25") +AC_DEFINE_UNQUOTED(VERSION,"0.6.43.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) @@ -52,18 +53,35 @@ dnl if test "$PTHREADLIB" != "-lpthread"; then dnl AC_MSG_ERROR(failed: I need posix threads, pthread) dnl fi -dnl Check for DB2 -AC_CHECK_HEADER(db2/db.h, - [AC_CHECK_LIB(db2,db_open, - [AC_DEFINE(HAVE_DB2) DB2LIB="-ldb2"])]) -AC_SUBST(DB2LIB) +dnl Check for BDB +saveLIBS="$LIBS" +LIBS="$LIBS -ldb" + +AC_CHECK_HEADER(db.h, + [AC_MSG_CHECKING(if we can link against BerkeleyDB) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include ], + [int r, s, t; db_version(&r, &s, &t);] + )], + [AC_DEFINE(HAVE_BDB) + BDBLIB="-ldb" + AC_MSG_RESULT(yes)], + [BDBLIB="" + AC_MSG_RESULT(no)] + )] +) + +LIBS="$saveLIBS" + +AC_SUBST(BDBLIB) dnl Converts the ARCH to be something singular for this general CPU family dnl This is often the dpkg architecture string. AC_MSG_CHECKING(system architecture) archset="`awk \" ! /^#|^\\\$/ { if(match(\\\"$target_cpu\\\",\\\"^\\\"\\\$1\\\"\\\$\\\")) {print \\\$2; exit}}\" $srcdir/buildlib/archtable`" if test "x$archset" = "x"; then - AC_MSG_ERROR(failed: use --host=) + AC_MSG_ERROR(failed: use --host= or check buildlib/archtable) fi AC_MSG_RESULT($archset) AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")