dnl 'make -f Makefile startup' will generate the configure file from
dnl configure.ac correctly and can be run at any time
-AC_PREREQ(2.50)
-AC_INIT(configure.ac)
+AC_PREREQ([2.68])
+AC_INIT
+AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR(buildlib)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
PACKAGE="apt"
-PACKAGE_VERSION="1.0.4"
+PACKAGE_VERSION="1.3~pre3+cmake2"
PACKAGE_MAIL="APT Development Team <deity@lists.debian.org>"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION")
AC_SUBST(PACKAGE_MAIL)
dnl Check the archs, we want the target type.
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
dnl Check our C compiler
-AC_CHECK_TOOL_PREFIX
+
AC_PROG_CC
-AC_ISC_POSIX
+AC_SEARCH_LIBS([strerror],[cposix])
dnl check for large file support and enable it if possible
dnl do this early as other stuff might depend on it
AC_SUBST(SOCKETLIBS)
LIBS="$SAVE_LIBS"
-dnl Checks for pthread -- disabled due to glibc bugs jgg
-dnl AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD) PTHREADLIB="-lpthread"])
+dnl Checks for pthread
+AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD) PTHREADLIB="-lpthread"])
AC_SUBST(PTHREADLIB)
-dnl if test "$PTHREADLIB" != "-lpthread"; then
-dnl AC_MSG_ERROR(failed: I need posix threads, pthread)
-dnl fi
+if test "$PTHREADLIB" != "-lpthread"; then
+ AC_MSG_ERROR(failed: I need posix threads, pthread)
+fi
dnl Check for BDB
saveLIBS="$LIBS"
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(gtest/gtest.h,,
- AC_MSG_ERROR([failed: I need gtest to build tests]),
+ AC_MSG_WARN([failed: I need gtest (packaged as libgtest-dev) for unit testing]),
)
AC_LANG_POP([C++])
AC_DEFINE(HAVE_ZLIB)
fi
+HAVE_LZ4=no
+AC_CHECK_LIB(lz4, LZ4F_createCompressionContext,[AC_CHECK_HEADER(lz4frame.h, [HAVE_LZ4=yes], [])], [])
+AC_SUBST(HAVE_LZ4)
+if test "x$HAVE_LZ4" = "xyes"; then
+ AC_DEFINE(HAVE_LZ4)
+fi
+
HAVE_BZ2=no
AC_CHECK_LIB(bz2, BZ2_bzopen,[AC_CHECK_HEADER(bzlib.h, [HAVE_BZ2=yes], [])], [])
AC_SUBST(HAVE_BZ2)
[AC_MSG_ERROR("not found.")])
])
-dnl Check for debiandoc
-AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html)
-AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text)
+
+dnl check for setuid checking function
+AC_CHECK_FUNCS(getresuid getresgid setresuid setresgid)
+AC_SUBST(HAVE_GETRESUID)
+AC_SUBST(HAVE_GETRESGID)
+AC_SUBST(HAVE_SETRESUID)
+AC_SUBST(HAVE_SETRESGID)
dnl Check for doxygen
AC_PATH_PROG(DOXYGEN, doxygen)
dnl Check for the XSLTProc tool needed to build man pages together with po4a
AC_PATH_PROG(XSLTPROC,xsltproc)
+AC_PATH_PROG(W3M, w3m)
dnl Check for the po4a tool needed to build man pages
AC_PATH_PROG(PO4A,po4a)
AC_SUBST(USE_NLS)
AC_PATH_PROG(BASH, bash)
-AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in doc/Doxyfile:doc/Doxyfile.in,make -s dirs)
+AC_CONFIG_FILES([environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in doc/Doxyfile:doc/Doxyfile.in])
+AC_OUTPUT