X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d7bccc73c61de8be73c71c4447b9a007ffb80834..83d89a9f6a641adccce898eb0bc675d94bc46465:/configure.in diff --git a/configure.in b/configure.in index 2ecd0b15d..100784474 100644 --- a/configure.in +++ b/configure.in @@ -1,3 +1,4 @@ +ad dnl Process this file with autoconf to produce a configure script. dnl The ONLY thing this is used for is to configure for different dnl linux architectures and configurations, it is not used to make the @@ -8,9 +9,17 @@ dnl some of the more populare bsd/sysv ones (like select). You'll also dnl need a C++ compiler that is semi-standard conformant, exceptions are 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_INIT(configure.in) +AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in) +dnl -- SET THIS TO THE RELEASE VERSION -- +AC_DEFINE_UNQUOTED(VERSION,"0.3.0") +AC_DEFINE_UNQUOTED(PACKAGE,"apt") + dnl Tom's host stuff tl_CHECK_TOOL_PREFIX dnl Initial guess @@ -32,20 +41,34 @@ AC_PATH_XTRA AC_SUBST(X11LIB) X11LIB= if test "$no_x" != "yes"; then - X11LIB="-lx11" + X11LIB="-lX11" + AC_DEFINE(HAVE_X11) + dnl Checks for ZPM + AC_CHECK_LIB(Xpm, XpmLibraryVersion,[AC_DEFINE(HAVE_LIBXPM) XPMLIB="-lXpm"],,$X_LIBS $X_PRE_LIBS $X11LIB $X_EXTRA_LIBS) + AC_SUBST(XPMLIB) + if test "$XPMLIB" != "-lXpm"; then + AC_MSG_ERROR(failed: I need xpm if you are building for X) + fi fi dnl Checks for Slang -AC_CHECK_LIB(slang, init_SLang,SLANGLIB="-lslang") +AC_CHECK_LIB(slang, SLang_Version,[AC_DEFINE(HAVE_LIBSLANG) SLANGLIB="-lslang"]) AC_SUBST(SLANGLIB) dnl Checks for GPM AC_ARG_WITH(gpm,[ --without-gpm do not use GPM mouse support]) if test "$with_gpm" != "no"; then - AC_CHECK_LIB(gpm, Gpm_Open,GPMLIB="-lgpm") + AC_CHECK_LIB(gpm, Gpm_Open,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"]) AC_SUBST(GPMLIB) fi +dnl Checks for pthread +AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD) PTHREADLIB="-lpthread"]) +AC_SUBST(PTHREADLIB) +if test "$PTHREADLIB" != "-lpthread"; then + AC_MSG_ERROR(failed: I need posix threads, pthread) +fi + dnl Converts the ARCH to be the same as dpkg AC_MSG_CHECKING(system architecture) archset="`awk '$1 == "'$host_cpu'" { print $2 }' $srcdir/buildlib/archtable`" @@ -53,7 +76,7 @@ if test "x$archset" = "x"; then AC_MSG_ERROR(failed: use --host=) fi AC_MSG_RESULT($archset) -AC_DEFINE_UNQUOTED(PKG_DEB_ARCH,"$archset") +AC_DEFINE_UNQUOTED(ARCHITECTURE,"$archset") dnl Check the sizes etc. of the architecture changequote(,) @@ -83,4 +106,4 @@ dnl Check for debiandoc AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","") AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","") -AC_OUTPUT(environment.mak:buildlib/environment.mak.in) +AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs)