]> git.saurik.com Git - apt.git/blobdiff - configure.in
update version
[apt.git] / configure.in
index 666acd844e8f0f6dbeac17b7a2c4cae0e3029045..1ad00992ed9dd90e8d8f89ff571d0820b7519c52 100644 (file)
@@ -17,48 +17,61 @@ 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.15")
+AC_DEFINE_UNQUOTED(VERSION,"0.3.16")
 AC_DEFINE_UNQUOTED(PACKAGE,"apt")
 
-dnl Tom's host stuff
-tl_CHECK_TOOL_PREFIX   dnl Initial guess
-
 dnl Check our C compiler
-tl_PROG_CC
+AC_CHECK_TOOL_PREFIX
+AC_PROG_CC
 AC_ISC_POSIX
 
 dnl Check the host arch (build+target not needed... yet)
-tl_CANONICAL_HOST
-tl_CHECK_TOOL_PREFIX   dnl recheck, in case the initial guess was wrong
+AC_CANONICAL_HOST
+AC_CHECK_TOOL_PREFIX   dnl recheck, in case the initial guess was wrong
 
 dnl Check for other programs
-tl_PROG_CXX
-AC_LANG_CPLUSPLUS
-dnl Checks for X11
-AC_PATH_X
-AC_PATH_XTRA
-AC_SUBST(X11LIB)
-X11LIB=
-if test "$no_x" != "yes"; then
-  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, 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,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
-  AC_SUBST(GPMLIB)
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_RANLIB
+AC_CHECK_TOOL(AR,ar,"ar")
+
+dnl Checks for sockets
+SAVE_LIBS="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS(gethostbyname,nsl)
+AC_SEARCH_LIBS(connect,socket)
+SOCKETLIBS="$LIBS"
+AC_SUBST(SOCKETLIBS)
+LIBS="$SAVE_LIBS"
+
+dnl Section Disabled pending removal of deity widget library  -- jgg
+if test "yes" != "yes"; then
+ dnl Checks for X11
+ AC_PATH_X
+ AC_PATH_XTRA
+ AC_SUBST(X11LIB)
+ X11LIB=
+ if test "$no_x" != "yes"; then
+   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, 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,[AC_DEFINE(HAVE_LIBGPM) GPMLIB="-lgpm"])
+   AC_SUBST(GPMLIB)
+ fi
 fi
 
 dnl Checks for pthread
@@ -70,7 +83,7 @@ AC_SUBST(PTHREADLIB)
 
 dnl Converts the ARCH to be the same as dpkg
 AC_MSG_CHECKING(system architecture)
-archset="`awk \"{ if(\\\$1 == \\\"$host_cpu\\\") print $2 }\" $srcdir/buildlib/archtable`"
+archset="`awk \"{ if(\\\$1 == \\\"$host_cpu\\\") print \\\$2 }\" $srcdir/buildlib/archtable`"
 if test "x$archset" = "x"; then
   AC_MSG_ERROR(failed: use --host=)
 fi
@@ -80,12 +93,27 @@ AC_DEFINE_UNQUOTED(ARCHITECTURE,"$archset")
 dnl We use C9x types if at all possible
 AC_CACHE_CHECK([for C9x integer types],c9x_ints,[
     AC_TRY_COMPILE([#include <inttypes.h>],
-                   [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;uint64_t Foo],
+                   [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;],
                   c9x_ints=yes,c9x_ints=no)])
 
+dnl Single Unix Spec statvfs
+AC_CHECK_FUNC(statvfs,[HAVE_STATVFS=yes])
+AC_SUBST(HAVE_STATVFS)
+
+dnl Arg, linux and bsd put their statfs function in different places
+if test x"$HAVE_STATVFS" != x"yes"; then
+   AC_EGREP_HEADER(statfs,sys/vfs.h,[AC_DEFINE(HAVE_VFS_H)],[
+   AC_EGREP_HEADER(statfs,sys/mount.h,[AC_DEFINE(HAVE_MOUNT_H)],[AC_MSG_ERROR(failed: Need statvfs)])
+   ])
+fi
+
 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
+dnl with their size values.
 changequote(,)
-if archline="`grep '^$archset' | cut -f 2- -d ' '`";then
+archline="`grep \"^$archset\" $srcdir/buildlib/sizetable | cut -f 2- -d ' '`"
+if test "x$archline" != "x"; then
    changequote([,])
    set $archline
    if test "$1" = "little"; then
@@ -99,12 +127,13 @@ if archline="`grep '^$archset' | cut -f 2- -d ' '`";then
    size_long=$5
 fi
 
-if test "$cross_compiling" = "yes" -a "$archline" = ""; then
+dnl I wonder what AC_C_BIGENDIAN does if you cross compile...
+if test "$cross_compiling" = "yes" -a "x$archline" = "x"; then
   AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable)
 fi
 AC_C_BIGENDIAN
    
-dnl We do not need this if we have inttypes..
+dnl We do not need this if we have inttypes!
 HAVE_C9X=yes
 if test x"$c9x_ints" = x"no"; then
    AC_CHECK_SIZEOF(char,$size_char)
@@ -116,6 +145,23 @@ if test x"$c9x_ints" = x"no"; then
    AC_SUBST(HAVE_C9X)
 fi
 
+dnl HP-UX sux..
+AC_MSG_CHECKING(for missing socklen_t)
+AC_EGREP_HEADER(socklen_t, sys/socket.h,[AC_MSG_RESULT(no)],[
+       AC_DEFINE(NEED_SOCKLEN_T_DEFINE)
+       NEED_SOCKLEN_T_DEFINE=yes
+        AC_MSG_RESULT(missing.)])
+AC_SUBST(NEED_SOCKLEN_T_DEFINE)
+
+dnl HP-UX needs -d_XOPEN_SOURCE_EXTENDED for h_errno
+AC_MSG_CHECKING(for h_errno)
+AC_EGREP_HEADER(h_errno, netdb.h, [AC_MSG_RESULT(normal)],
+   [CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+    AC_EGREP_HEADER(h_errno, netdb.h, 
+       [AC_MSG_RESULT(needs _XOPEN_SOURCE_EXTENDED)],
+       [AC_MSG_ERROR("not found.")])
+   ])
+
 dnl Check for debiandoc
 AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","")
 AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
@@ -123,4 +169,6 @@ AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","")
 dnl Check for YODL
 AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")
 
+ah_NUM_PROCS
+
 AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs)