X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c8e9cc5c7ec8985b90a88d1bd6ee7a17fd3d8870..1c19f1a34b96b7cc21798c47ef572661f103aec9:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index 95ff0176e..03399f5c5 100644 --- a/configure.in +++ b/configure.in @@ -12,13 +12,16 @@ 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.1") -AC_DEFINE_UNQUOTED(PACKAGE,"apt") +AC_DEFINE_UNQUOTED(VERSION,"0.6.40.1ubuntu5") +PACKAGE="apt" +AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") +AC_SUBST(PACKAGE) dnl Check the archs, we want the target type. AC_CANONICAL_SYSTEM @@ -50,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") @@ -90,6 +110,10 @@ if test x"$HAVE_STATVFS" != x"yes"; then ]) fi +dnl We should use the real timegm function if we have it. +AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM)) +AC_SUBST(HAVE_TIMEGM) + dnl Check the sizes etc. of the architecture dnl This is stupid, it should just use the AC macros like it does below dnl Cross compilers can either get a real C library or preload the cache @@ -152,14 +176,31 @@ AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html) AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text) dnl Check for the SGML tools needed to build man pages -AC_PATH_PROG(NSGMLS,nsgmls) -AC_PATH_PROG(SGMLSPL,sgmlspl) +AC_PATH_PROG(DOCBOOK2MAN,docbook2man) + +dnl Check for the XML tools needed to build man pages +AC_PATH_PROG(XMLTO,xmlto) + +dnl Check for the XML tools needed to build man pages +AC_PATH_PROG(XMLTO,xmlto) dnl Check for YODL dnl AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","") ah_NUM_PROCS -ah_GLIBC_VER -ah_LIBSTDCPP_VER +rc_GLIBC_VER +rc_LIBSTDCPP_VER +ah_GCC3DEP + +dnl It used to be that the user could select translations and that could get +dnl passed to the makefiles, but now that can only work if you use special +dnl gettext approved makefiles, so this feature is unsupported by this. +ALL_LINGUAS="da de en_GB es fr hu it nl no_NO pl pt_BR ru sv zh_TW" +AM_GNU_GETTEXT(external) +if test x"$USE_NLS" = "xyes"; then + AC_DEFINE(USE_NLS) +fi +AC_SUBST(USE_NLS) +AC_PATH_PROG(BASH, bash) AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs)