- rename deprecated configure.in to configure.ac (Ralf)
authorpmatilai <pmatilai>
Wed, 21 Jun 2006 14:51:51 +0000 (14:51 +0000)
committerpmatilai <pmatilai>
Wed, 21 Jun 2006 14:51:51 +0000 (14:51 +0000)
Makefile.in
apt-pkg/Makefile.in
buildlib/config.h.in
cmdline/Makefile.in
configure
configure.ac [new file with mode: 0644]
configure.in [deleted file]
doc/Makefile.in
lua/Makefile.in
methods/Makefile.in
tools/Makefile.in

index 94e74f0..3adc741 100644 (file)
@@ -54,7 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
index 8443d29..0240b88 100644 (file)
@@ -47,7 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
index af1f0f0..29dfe2e 100644 (file)
@@ -1,4 +1,4 @@
-/* buildlib/config.h.in.  Generated from configure.in by autoheader.  */
+/* buildlib/config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* Define the common CPU */
 #undef COMMON_CPU
index e89002a..975b4f2 100644 (file)
@@ -48,7 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
index d8ba850..39e110a 100755 (executable)
--- a/configure
+++ b/configure
@@ -427,7 +427,7 @@ PACKAGE_VERSION='0.5.15lorg3.1'
 PACKAGE_STRING='apt 0.5.15lorg3.1'
 PACKAGE_BUGREPORT='apt-rpm@lists.laiskiainen.org'
 
-ac_unique_file="configure.in"
+ac_unique_file="AUTHORS.RPM"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..f5f91b8
--- /dev/null
@@ -0,0 +1,518 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([apt],[0.5.15lorg3.1],[apt-rpm@lists.laiskiainen.org])
+dnl Check the archs, we want the target type.
+AC_CONFIG_AUX_DIR([buildlib])
+AC_CANONICAL_HOST
+AC_CONFIG_SRCDIR([AUTHORS.RPM])
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 1.9.5])
+AM_MAINTAINER_MODE
+
+AC_CONFIG_HEADER([include/config.h:buildlib/config.h.in])
+
+AC_PROG_LIBTOOL
+
+dnl Check our C compiler
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_ISC_POSIX
+
+dnl Check for other programs
+AC_PROG_CXX
+AC_PROG_CPP
+
+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 Checks for pthread -- disabled due to glibc bugs jgg
+dnl 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
+
+dnl Check for RPM executable path
+AC_PATH_PROG(RPM_PATH,rpm,none)
+if test "$RPM_PATH" = "none"; then
+   AC_MSG_ERROR([RPM executable was not found in your system])
+else
+   AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
+
+   dnl Check for RPM version
+   AC_MSG_CHECKING(for RPM version)
+   RPM_VERSION_RAW=`LANG= LC_ALL= $RPM_PATH --version | sed 's/^RPM version //'`
+   RPM_VERSION_MAJOR=`echo $RPM_VERSION_RAW | cut -d. -f1`
+   RPM_VERSION_MINOR=`echo $RPM_VERSION_RAW | cut -d. -f2`
+   RPM_VERSION_MICRO=`echo $RPM_VERSION_RAW | cut -d. -f3`
+   if test -z "$RPM_VERSION_MAJOR" -o -z "$RPM_VERSION_MINOR"; then
+      AC_MSG_ERROR([can't parse RPM version])
+   fi
+   if test -z "$RPM_VERSION_MICRO"; then
+      RPM_VERSION_MICRO=0
+   fi
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MAJOR],$RPM_VERSION_MAJOR,[RPM major version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MINOR],$RPM_VERSION_MINOR,[RPM minor version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MICRO],$RPM_VERSION_MICRO,[RPM micro version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION],
+      [((RPM_VERSION_MAJOR<<16)|(RPM_VERSION_MINOR<<8)|RPM_VERSION_MICRO)],
+      [Define to the RPM version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_RAW],"$RPM_VERSION_RAW",[RPM raw version])
+   AC_MSG_RESULT($RPM_VERSION_RAW)
+
+   dnl Check for RPM libraries and headers
+
+   AC_CHECK_LIB(bz2,BZ2_bzopen, [],
+               [AC_MSG_ERROR([Can't find libbz2 library])])
+   AC_CHECK_LIB(z,gzopen, [],
+               [AC_MSG_ERROR([Can't find libz library])])
+   AC_CHECK_HEADERS(db1/db.h)
+
+   CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
+   AC_CHECK_HEADER(rpm/rpmlib.h, [],
+                  [AC_MSG_ERROR([Can't find rpmlib.h])])
+
+   if test $RPM_VERSION_MAJOR -lt 4; then
+      RPMLIBS="-lrpm -lz -lbz2 -lpopt"
+   else
+      AC_CHECK_LIB(rpmdb,rpmdbOpen,
+         [RPMDBLIBS="-lrpmdb"],
+         [RPMDBLIBS="-ldb-3.1"],
+         [-lrpm -lrpmio -lz -lbz2 -lpopt])
+      RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt"
+   fi
+   AC_MSG_CHECKING(for RPM libraries)
+   AC_MSG_RESULT($RPMLIBS)
+   AC_SUBST(RPMLIBS)
+fi
+
+dnl repomd support needs libxml2, not sure about the minimal version - I've
+dnl only tested it with 2.6.20
+## xmlReadFile is not available before 2.6.0
+PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6])
+RPMLIBS="$LIBXML2_LIBS $RPMLIBS"
+CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
+
+dnl Can we use g++ hash_map?
+AH_TEMPLATE(WITH_GNU_HASH_MAP,
+           [Define to 1 if you want to use the g++ hash_map extension.])
+AC_MSG_CHECKING(for g++ hash_map extension)
+AC_LANG_PUSH([C++])
+AC_TRY_LINK(
+[
+#include <ext/hash_map>
+using namespace __gnu_cxx;
+],[hash_map<char*,hash<char*> > HashMap;
+],[AC_DEFINE_UNQUOTED(WITH_GNU_HASH_MAP, 1) AC_MSG_RESULT(yes)
+],[AC_MSG_RESULT(no)])
+AC_LANG_POP([C++])
+
+dnl CNC:2003-03-20
+AC_MSG_CHECKING(for --disable-scripts)
+AC_ARG_ENABLE([scripts],
+             AC_HELP_STRING(--disable-scripts, disable the extension system),
+             [enable_scripts="$enableval"],[enable_scripts="yes"])
+if test "$enable_scripts" != "no"; then
+  AC_MSG_RESULT(no)
+  AC_DEFINE(WITH_LUA, 1, 
+           [Define if you want to enable the extension system.]) 
+else
+  AC_MSG_RESULT(yes)
+fi
+AM_CONDITIONAL(WITH_LUA, test "$enable_scripts" != "no")
+
+dnl Before configuring libtool check for --enable-static-progs option
+AC_MSG_CHECKING(for --enable-static-progs)
+AC_ARG_ENABLE(static-progs,
+             AC_HELP_STRING([--enable-static-progs],
+                            [Build completely static (standalone) binaries.]),
+             [enable_static_progs="$enableval"],[enable_static_progs="no"])
+AM_CONDITIONAL(COMPILE_STATIC, test "$enable_static_progs" = "yes")
+if test "$enable_static_progs" = "yes" ; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
+dnl Check for apt-shell dependencies
+AC_CHECK_LIB(ncurses,tputs,
+  [AC_CHECK_HEADER(readline/readline.h,
+     [AC_CHECK_LIB(readline,rl_completion_matches,
+        [compile_aptshell=yes],,[-lncurses])])])
+AM_CONDITIONAL(COMPILE_APTSHELL, test "$compile_aptshell" = "yes")
+
+dnl Converts the ARCH to be something singular for this general CPU family
+dnl This is often the dpkg architecture string.
+AH_TEMPLATE(COMMON_CPU, [Define the common CPU])
+AH_TEMPLATE(COMMON_OS, [Define the common OS])
+AC_MSG_CHECKING(system architecture)
+archset="`awk \" ! /^#|^\\\$/ { if(match(\\\"$host_cpu\\\",\\\"^\\\"\\\$1\\\"\\\$\\\")) {print \\\$2; exit}}\" $srcdir/buildlib/archtable`"
+if test "x$archset" = "x"; then
+  AC_MSG_ERROR(failed: use --host=)
+fi
+AC_MSG_RESULT($archset)
+AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")
+
+dnl Get a common name for the host OS - this is primarily only for HURD and is
+dnl non fatal if it fails
+AC_MSG_CHECKING(system OS)
+osset="`awk \" ! /^#|^\\\$/ {if (match(\\\"$host_vendor-$host_os\\\",\\\$1)) {print \\\$2; exit}}\" $srcdir/buildlib/ostable`"
+AC_MSG_RESULT($osset)
+AC_DEFINE_UNQUOTED(COMMON_OS,"$osset")
+
+dnl We use C99 types if at all possible
+AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
+    AC_TRY_COMPILE([#include <inttypes.h>],
+                   [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;],
+                  c9x_ints=yes,c9x_ints=no)])
+
+AC_C_BIGENDIAN
+
+dnl Check the sizes etc. of the architecture
+dnl Cross compilers can either get a real C library or preload the cache
+dnl with their size values.
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(long)
+
+dnl Single Unix Spec statvfs
+AC_CHECK_FUNC(statvfs,[have_statvfs=yes])
+
+dnl Arg, linux and bsd put their statfs function in different places
+AH_TEMPLATE(HAVE_VFS_H, [Define to 1 if sys/vfs.h is available])
+AH_TEMPLATE(HAVE_MOUNT_H, [Define to 1 if sys/mount.h is available])
+if test "$have_statvfs" != "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 We should use the real timegm function if we have it.
+AH_TEMPLATE(HAVE_TIMEGM, [Define to 1 if timegm is available])
+AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
+AC_SUBST(HAVE_TIMEGM)
+
+dnl HP-UX sux..
+AH_TEMPLATE(NEED_SOCKLEN_T_DEFINE, [Define to 1 if socket_t is missing])
+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
+dnl AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html)
+dnl AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text)
+
+AC_PATH_PROG([GPG],[gpg],[/usr/bin/gpg])
+
+AM_GNU_GETTEXT_VERSION([0.14.5])
+AM_GNU_GETTEXT([external])
+
+dnl ah_NUM_PROCS
+rc_GLIBC_VER
+rc_LIBSTDCPP_VER
+dnl ah_GCC3DEP
+
+AC_CONFIG_FILES([
+         Makefile
+         lua/Makefile
+         apt-pkg/Makefile
+         methods/Makefile
+         cmdline/Makefile
+         tools/Makefile
+         doc/Makefile
+         po/Makefile.in
+         ])
+AC_CONFIG_LINKS([include/apti18n.h:buildlib/gettext.h])
+
+AS_IF([test "$c9x_ints" = "no"],[
+AC_CONFIG_LINKS([include/inttypes.h:buildlib/inttypes.h])
+])
+
+AS_IF([test "$have_statvfs" != "yes"],[
+AC_CONFIG_LINKS([include/statvfs.h:buildlib/statvfs.h])
+])
+
+AS_IF([test "$NEED_SOCKLEN_T_DEFINE" = "yes"],[
+AC_CONFIG_LINKS([include/netdb.h:buildlib/netdb.h])
+])
+
+AC_OUTPUT
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([apt],[0.5.15lorg3.1],[apt-rpm@lists.laiskiainen.org])
+dnl Check the archs, we want the target type.
+AC_CONFIG_AUX_DIR([buildlib])
+AC_CANONICAL_HOST
+AC_CONFIG_SRCDIR([AUTHORS.RPM])
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 1.9.5])
+AM_MAINTAINER_MODE
+
+AC_CONFIG_HEADER([include/config.h:buildlib/config.h.in])
+
+AC_PROG_LIBTOOL
+
+dnl Check our C compiler
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_ISC_POSIX
+
+dnl Check for other programs
+AC_PROG_CXX
+AC_PROG_CPP
+
+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 Checks for pthread -- disabled due to glibc bugs jgg
+dnl 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
+
+dnl Check for RPM executable path
+AC_PATH_PROG(RPM_PATH,rpm,none)
+if test "$RPM_PATH" = "none"; then
+   AC_MSG_ERROR([RPM executable was not found in your system])
+else
+   AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
+
+   dnl Check for RPM version
+   AC_MSG_CHECKING(for RPM version)
+   RPM_VERSION_RAW=`LANG= LC_ALL= $RPM_PATH --version | sed 's/^RPM version //'`
+   RPM_VERSION_MAJOR=`echo $RPM_VERSION_RAW | cut -d. -f1`
+   RPM_VERSION_MINOR=`echo $RPM_VERSION_RAW | cut -d. -f2`
+   RPM_VERSION_MICRO=`echo $RPM_VERSION_RAW | cut -d. -f3`
+   if test -z "$RPM_VERSION_MAJOR" -o -z "$RPM_VERSION_MINOR"; then
+      AC_MSG_ERROR([can't parse RPM version])
+   fi
+   if test -z "$RPM_VERSION_MICRO"; then
+      RPM_VERSION_MICRO=0
+   fi
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MAJOR],$RPM_VERSION_MAJOR,[RPM major version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MINOR],$RPM_VERSION_MINOR,[RPM minor version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_MICRO],$RPM_VERSION_MICRO,[RPM micro version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION],
+      [((RPM_VERSION_MAJOR<<16)|(RPM_VERSION_MINOR<<8)|RPM_VERSION_MICRO)],
+      [Define to the RPM version])
+   AC_DEFINE_UNQUOTED([RPM_VERSION_RAW],"$RPM_VERSION_RAW",[RPM raw version])
+   AC_MSG_RESULT($RPM_VERSION_RAW)
+
+   dnl Check for RPM libraries and headers
+
+   AC_CHECK_LIB(bz2,BZ2_bzopen, [],
+               [AC_MSG_ERROR([Can't find libbz2 library])])
+   AC_CHECK_LIB(z,gzopen, [],
+               [AC_MSG_ERROR([Can't find libz library])])
+   AC_CHECK_HEADERS(db1/db.h)
+
+   CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
+   AC_CHECK_HEADER(rpm/rpmlib.h, [],
+                  [AC_MSG_ERROR([Can't find rpmlib.h])])
+
+   if test $RPM_VERSION_MAJOR -lt 4; then
+      RPMLIBS="-lrpm -lz -lbz2 -lpopt"
+   else
+      AC_CHECK_LIB(rpmdb,rpmdbOpen,
+         [RPMDBLIBS="-lrpmdb"],
+         [RPMDBLIBS="-ldb-3.1"],
+         [-lrpm -lrpmio -lz -lbz2 -lpopt])
+      RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt"
+   fi
+   AC_MSG_CHECKING(for RPM libraries)
+   AC_MSG_RESULT($RPMLIBS)
+   AC_SUBST(RPMLIBS)
+fi
+
+dnl repomd support needs libxml2, not sure about the minimal version - I've
+dnl only tested it with 2.6.20
+## xmlReadFile is not available before 2.6.0
+PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6])
+RPMLIBS="$LIBXML2_LIBS $RPMLIBS"
+CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
+
+dnl Can we use g++ hash_map?
+AH_TEMPLATE(WITH_GNU_HASH_MAP,
+           [Define to 1 if you want to use the g++ hash_map extension.])
+AC_MSG_CHECKING(for g++ hash_map extension)
+AC_LANG_PUSH([C++])
+AC_TRY_LINK(
+[
+#include <ext/hash_map>
+using namespace __gnu_cxx;
+],[hash_map<char*,hash<char*> > HashMap;
+],[AC_DEFINE_UNQUOTED(WITH_GNU_HASH_MAP, 1) AC_MSG_RESULT(yes)
+],[AC_MSG_RESULT(no)])
+AC_LANG_POP([C++])
+
+dnl CNC:2003-03-20
+AC_MSG_CHECKING(for --disable-scripts)
+AC_ARG_ENABLE([scripts],
+             AC_HELP_STRING(--disable-scripts, disable the extension system),
+             [enable_scripts="$enableval"],[enable_scripts="yes"])
+if test "$enable_scripts" != "no"; then
+  AC_MSG_RESULT(no)
+  AC_DEFINE(WITH_LUA, 1, 
+           [Define if you want to enable the extension system.]) 
+else
+  AC_MSG_RESULT(yes)
+fi
+AM_CONDITIONAL(WITH_LUA, test "$enable_scripts" != "no")
+
+dnl Before configuring libtool check for --enable-static-progs option
+AC_MSG_CHECKING(for --enable-static-progs)
+AC_ARG_ENABLE(static-progs,
+             AC_HELP_STRING([--enable-static-progs],
+                            [Build completely static (standalone) binaries.]),
+             [enable_static_progs="$enableval"],[enable_static_progs="no"])
+AM_CONDITIONAL(COMPILE_STATIC, test "$enable_static_progs" = "yes")
+if test "$enable_static_progs" = "yes" ; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
+dnl Check for apt-shell dependencies
+AC_CHECK_LIB(ncurses,tputs,
+  [AC_CHECK_HEADER(readline/readline.h,
+     [AC_CHECK_LIB(readline,rl_completion_matches,
+        [compile_aptshell=yes],,[-lncurses])])])
+AM_CONDITIONAL(COMPILE_APTSHELL, test "$compile_aptshell" = "yes")
+
+dnl Converts the ARCH to be something singular for this general CPU family
+dnl This is often the dpkg architecture string.
+AH_TEMPLATE(COMMON_CPU, [Define the common CPU])
+AH_TEMPLATE(COMMON_OS, [Define the common OS])
+AC_MSG_CHECKING(system architecture)
+archset="`awk \" ! /^#|^\\\$/ { if(match(\\\"$host_cpu\\\",\\\"^\\\"\\\$1\\\"\\\$\\\")) {print \\\$2; exit}}\" $srcdir/buildlib/archtable`"
+if test "x$archset" = "x"; then
+  AC_MSG_ERROR(failed: use --host=)
+fi
+AC_MSG_RESULT($archset)
+AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")
+
+dnl Get a common name for the host OS - this is primarily only for HURD and is
+dnl non fatal if it fails
+AC_MSG_CHECKING(system OS)
+osset="`awk \" ! /^#|^\\\$/ {if (match(\\\"$host_vendor-$host_os\\\",\\\$1)) {print \\\$2; exit}}\" $srcdir/buildlib/ostable`"
+AC_MSG_RESULT($osset)
+AC_DEFINE_UNQUOTED(COMMON_OS,"$osset")
+
+dnl We use C99 types if at all possible
+AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
+    AC_TRY_COMPILE([#include <inttypes.h>],
+                   [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;],
+                  c9x_ints=yes,c9x_ints=no)])
+
+AC_C_BIGENDIAN
+
+dnl Check the sizes etc. of the architecture
+dnl Cross compilers can either get a real C library or preload the cache
+dnl with their size values.
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(long)
+
+dnl Single Unix Spec statvfs
+AC_CHECK_FUNC(statvfs,[have_statvfs=yes])
+
+dnl Arg, linux and bsd put their statfs function in different places
+AH_TEMPLATE(HAVE_VFS_H, [Define to 1 if sys/vfs.h is available])
+AH_TEMPLATE(HAVE_MOUNT_H, [Define to 1 if sys/mount.h is available])
+if test "$have_statvfs" != "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 We should use the real timegm function if we have it.
+AH_TEMPLATE(HAVE_TIMEGM, [Define to 1 if timegm is available])
+AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
+AC_SUBST(HAVE_TIMEGM)
+
+dnl HP-UX sux..
+AH_TEMPLATE(NEED_SOCKLEN_T_DEFINE, [Define to 1 if socket_t is missing])
+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
+dnl AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html)
+dnl AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text)
+
+AC_PATH_PROG([GPG],[gpg],[/usr/bin/gpg])
+
+AM_GNU_GETTEXT_VERSION([0.14.5])
+AM_GNU_GETTEXT([external])
+
+dnl ah_NUM_PROCS
+rc_GLIBC_VER
+rc_LIBSTDCPP_VER
+dnl ah_GCC3DEP
+
+AC_CONFIG_FILES([
+         Makefile
+         lua/Makefile
+         apt-pkg/Makefile
+         methods/Makefile
+         cmdline/Makefile
+         tools/Makefile
+         doc/Makefile
+         po/Makefile.in
+         ])
+AC_CONFIG_LINKS([include/apti18n.h:buildlib/gettext.h])
+
+AS_IF([test "$c9x_ints" = "no"],[
+AC_CONFIG_LINKS([include/inttypes.h:buildlib/inttypes.h])
+])
+
+AS_IF([test "$have_statvfs" != "yes"],[
+AC_CONFIG_LINKS([include/statvfs.h:buildlib/statvfs.h])
+])
+
+AS_IF([test "$NEED_SOCKLEN_T_DEFINE" = "yes"],[
+AC_CONFIG_LINKS([include/netdb.h:buildlib/netdb.h])
+])
+
+AC_OUTPUT
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index e8fa8c2..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT([apt],[0.5.15lorg3.1],[apt-rpm@lists.laiskiainen.org])
-dnl Check the archs, we want the target type.
-AC_CONFIG_AUX_DIR([buildlib])
-AC_CANONICAL_HOST
-AC_CONFIG_SRCDIR([configure.in])
-AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 1.9.5])
-AM_MAINTAINER_MODE
-
-AC_CONFIG_HEADER([include/config.h:buildlib/config.h.in])
-
-AC_PROG_LIBTOOL
-
-dnl Check our C compiler
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_ISC_POSIX
-
-dnl Check for other programs
-AC_PROG_CXX
-AC_PROG_CPP
-
-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 Checks for pthread -- disabled due to glibc bugs jgg
-dnl 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
-
-dnl Check for RPM executable path
-AC_PATH_PROG(RPM_PATH,rpm,none)
-if test "$RPM_PATH" = "none"; then
-   AC_MSG_ERROR([RPM executable was not found in your system])
-else
-   AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
-
-   dnl Check for RPM version
-   AC_MSG_CHECKING(for RPM version)
-   RPM_VERSION_RAW=`LANG= LC_ALL= $RPM_PATH --version | sed 's/^RPM version //'`
-   RPM_VERSION_MAJOR=`echo $RPM_VERSION_RAW | cut -d. -f1`
-   RPM_VERSION_MINOR=`echo $RPM_VERSION_RAW | cut -d. -f2`
-   RPM_VERSION_MICRO=`echo $RPM_VERSION_RAW | cut -d. -f3`
-   if test -z "$RPM_VERSION_MAJOR" -o -z "$RPM_VERSION_MINOR"; then
-      AC_MSG_ERROR([can't parse RPM version])
-   fi
-   if test -z "$RPM_VERSION_MICRO"; then
-      RPM_VERSION_MICRO=0
-   fi
-   AC_DEFINE_UNQUOTED([RPM_VERSION_MAJOR],$RPM_VERSION_MAJOR,[RPM major version])
-   AC_DEFINE_UNQUOTED([RPM_VERSION_MINOR],$RPM_VERSION_MINOR,[RPM minor version])
-   AC_DEFINE_UNQUOTED([RPM_VERSION_MICRO],$RPM_VERSION_MICRO,[RPM micro version])
-   AC_DEFINE_UNQUOTED([RPM_VERSION],
-      [((RPM_VERSION_MAJOR<<16)|(RPM_VERSION_MINOR<<8)|RPM_VERSION_MICRO)],
-      [Define to the RPM version])
-   AC_DEFINE_UNQUOTED([RPM_VERSION_RAW],"$RPM_VERSION_RAW",[RPM raw version])
-   AC_MSG_RESULT($RPM_VERSION_RAW)
-
-   dnl Check for RPM libraries and headers
-
-   AC_CHECK_LIB(bz2,BZ2_bzopen, [],
-               [AC_MSG_ERROR([Can't find libbz2 library])])
-   AC_CHECK_LIB(z,gzopen, [],
-               [AC_MSG_ERROR([Can't find libz library])])
-   AC_CHECK_HEADERS(db1/db.h)
-
-   CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
-   AC_CHECK_HEADER(rpm/rpmlib.h, [],
-                  [AC_MSG_ERROR([Can't find rpmlib.h])])
-
-   if test $RPM_VERSION_MAJOR -lt 4; then
-      RPMLIBS="-lrpm -lz -lbz2 -lpopt"
-   else
-      AC_CHECK_LIB(rpmdb,rpmdbOpen,
-         [RPMDBLIBS="-lrpmdb"],
-         [RPMDBLIBS="-ldb-3.1"],
-         [-lrpm -lrpmio -lz -lbz2 -lpopt])
-      RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt"
-   fi
-   AC_MSG_CHECKING(for RPM libraries)
-   AC_MSG_RESULT($RPMLIBS)
-   AC_SUBST(RPMLIBS)
-fi
-
-dnl repomd support needs libxml2, not sure about the minimal version - I've
-dnl only tested it with 2.6.20
-## xmlReadFile is not available before 2.6.0
-PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6])
-RPMLIBS="$LIBXML2_LIBS $RPMLIBS"
-CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
-
-dnl Can we use g++ hash_map?
-AH_TEMPLATE(WITH_GNU_HASH_MAP,
-           [Define to 1 if you want to use the g++ hash_map extension.])
-AC_MSG_CHECKING(for g++ hash_map extension)
-AC_LANG_PUSH([C++])
-AC_TRY_LINK(
-[
-#include <ext/hash_map>
-using namespace __gnu_cxx;
-],[hash_map<char*,hash<char*> > HashMap;
-],[AC_DEFINE_UNQUOTED(WITH_GNU_HASH_MAP, 1) AC_MSG_RESULT(yes)
-],[AC_MSG_RESULT(no)])
-AC_LANG_POP([C++])
-
-dnl CNC:2003-03-20
-AC_MSG_CHECKING(for --disable-scripts)
-AC_ARG_ENABLE([scripts],
-             AC_HELP_STRING(--disable-scripts, disable the extension system),
-             [enable_scripts="$enableval"],[enable_scripts="yes"])
-if test "$enable_scripts" != "no"; then
-  AC_MSG_RESULT(no)
-  AC_DEFINE(WITH_LUA, 1, 
-           [Define if you want to enable the extension system.]) 
-else
-  AC_MSG_RESULT(yes)
-fi
-AM_CONDITIONAL(WITH_LUA, test "$enable_scripts" != "no")
-
-dnl Before configuring libtool check for --enable-static-progs option
-AC_MSG_CHECKING(for --enable-static-progs)
-AC_ARG_ENABLE(static-progs,
-             AC_HELP_STRING([--enable-static-progs],
-                            [Build completely static (standalone) binaries.]),
-             [enable_static_progs="$enableval"],[enable_static_progs="no"])
-AM_CONDITIONAL(COMPILE_STATIC, test "$enable_static_progs" = "yes")
-if test "$enable_static_progs" = "yes" ; then
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
-
-dnl Check for apt-shell dependencies
-AC_CHECK_LIB(ncurses,tputs,
-  [AC_CHECK_HEADER(readline/readline.h,
-     [AC_CHECK_LIB(readline,rl_completion_matches,
-        [compile_aptshell=yes],,[-lncurses])])])
-AM_CONDITIONAL(COMPILE_APTSHELL, test "$compile_aptshell" = "yes")
-
-dnl Converts the ARCH to be something singular for this general CPU family
-dnl This is often the dpkg architecture string.
-AH_TEMPLATE(COMMON_CPU, [Define the common CPU])
-AH_TEMPLATE(COMMON_OS, [Define the common OS])
-AC_MSG_CHECKING(system architecture)
-archset="`awk \" ! /^#|^\\\$/ { if(match(\\\"$host_cpu\\\",\\\"^\\\"\\\$1\\\"\\\$\\\")) {print \\\$2; exit}}\" $srcdir/buildlib/archtable`"
-if test "x$archset" = "x"; then
-  AC_MSG_ERROR(failed: use --host=)
-fi
-AC_MSG_RESULT($archset)
-AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")
-
-dnl Get a common name for the host OS - this is primarily only for HURD and is
-dnl non fatal if it fails
-AC_MSG_CHECKING(system OS)
-osset="`awk \" ! /^#|^\\\$/ {if (match(\\\"$host_vendor-$host_os\\\",\\\$1)) {print \\\$2; exit}}\" $srcdir/buildlib/ostable`"
-AC_MSG_RESULT($osset)
-AC_DEFINE_UNQUOTED(COMMON_OS,"$osset")
-
-dnl We use C99 types if at all possible
-AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
-    AC_TRY_COMPILE([#include <inttypes.h>],
-                   [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;],
-                  c9x_ints=yes,c9x_ints=no)])
-
-AC_C_BIGENDIAN
-
-dnl Check the sizes etc. of the architecture
-dnl Cross compilers can either get a real C library or preload the cache
-dnl with their size values.
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(long)
-
-dnl Single Unix Spec statvfs
-AC_CHECK_FUNC(statvfs,[have_statvfs=yes])
-
-dnl Arg, linux and bsd put their statfs function in different places
-AH_TEMPLATE(HAVE_VFS_H, [Define to 1 if sys/vfs.h is available])
-AH_TEMPLATE(HAVE_MOUNT_H, [Define to 1 if sys/mount.h is available])
-if test "$have_statvfs" != "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 We should use the real timegm function if we have it.
-AH_TEMPLATE(HAVE_TIMEGM, [Define to 1 if timegm is available])
-AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
-AC_SUBST(HAVE_TIMEGM)
-
-dnl HP-UX sux..
-AH_TEMPLATE(NEED_SOCKLEN_T_DEFINE, [Define to 1 if socket_t is missing])
-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
-dnl AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html)
-dnl AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text)
-
-AC_PATH_PROG([GPG],[gpg],[/usr/bin/gpg])
-
-AM_GNU_GETTEXT_VERSION([0.14.5])
-AM_GNU_GETTEXT([external])
-
-dnl ah_NUM_PROCS
-rc_GLIBC_VER
-rc_LIBSTDCPP_VER
-dnl ah_GCC3DEP
-
-AC_CONFIG_FILES([
-         Makefile
-         lua/Makefile
-         apt-pkg/Makefile
-         methods/Makefile
-         cmdline/Makefile
-         tools/Makefile
-         doc/Makefile
-         po/Makefile.in
-         ])
-AC_CONFIG_LINKS([include/apti18n.h:buildlib/gettext.h])
-
-AS_IF([test "$c9x_ints" = "no"],[
-AC_CONFIG_LINKS([include/inttypes.h:buildlib/inttypes.h])
-])
-
-AS_IF([test "$have_statvfs" != "yes"],[
-AC_CONFIG_LINKS([include/statvfs.h:buildlib/statvfs.h])
-])
-
-AS_IF([test "$NEED_SOCKLEN_T_DEFINE" = "yes"],[
-AC_CONFIG_LINKS([include/netdb.h:buildlib/netdb.h])
-])
-
-AC_OUTPUT
index 6922553..6d98405 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
index e835765..87aa641 100644 (file)
@@ -46,7 +46,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
index 74ca4d4..4851549 100644 (file)
@@ -47,7 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs
index c48edf8..55c30e0 100644 (file)
@@ -47,7 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/buildlib/tools.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-       $(top_srcdir)/configure.in
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/buildlib/mkinstalldirs