1 dnl configure.in for RPM
3 dnl Don't add checks for things we can't work around, unless those checks
4 dnl failing causes the script to bomb out with a message. If we can't fix
9 AC_PREREQ(2.12) dnl Minimum Autoconf version required.
11 AM_INIT_AUTOMAKE(rpm, 4.3)
12 AM_CONFIG_HEADER(config.h)
14 dnl XXX AM_MAINTAINER_MODE
16 dnl Set of available languages.
17 ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr"
20 ****************************************************************************
22 * *** WARNING WARNING WARNING *** *
24 * This is source code from the development branch of rpm-4.3. *
26 * If you want the "production" rpm-4.2.1 code, then you should use a *
27 * rpm-4.2.1 src.rpm. Alternatively, if using a CVS checkout, do *
30 * cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login *
31 * (no password, just carriage return) *
32 * cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel get rpm *
35 * Here's the rpm-4_2 branch, latest is rpm-4.2.1: *
38 * Here's the rpm-4_1 branch, latest is rpm-4.1.1: *
41 * Here's the rpm-4_0 branch, latest is rpm-4.0.5: *
44 ****************************************************************************
48 dnl Checks for programs.
55 if test "$ac_cv_prog_gcc" = yes; then
56 CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
61 AC_PROG_GCC_TRADITIONAL
64 dnl Does this platform require array notation to assign to a va_list?
65 dnl If cross-compiling, we assume va_list is "normal". If this breaks
66 dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
67 dnl also just to be sure.
68 AC_MSG_CHECKING(whether va_list assignments need array notation)
69 AC_CACHE_VAL(ac_cv_valistisarray,
70 [AC_TRY_RUN([#include <stdlib.h>
72 void foo(int i, ...) {
76 if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
78 va_end(ap1); va_end(ap2);
80 int main() { foo(0, 123); return(0); }],
81 [ac_cv_valistisarray=false],
82 [ac_cv_valistisarray=true],
83 [ac_cv_valistisarray=false])])
85 if test "$ac_cv_valistisarray" = true ; then
86 AC_DEFINE(HAVE_VA_LIST_AS_ARRAY, 1,
87 [Define as 1 if your va_list type is an array])
97 export RPMUSER RPMUID RPMGROUP RPMGID
103 AC_PATH_PROG(CTAGS, ctags, /bin/true)
104 AC_PATH_PROG(CSCOPE, cscope, /bin/true)
107 dnl This now uses libtool. Put
108 dnl LDFLAGS_STATIC="-all"
109 dnl to attempt static executables using libtool. Otherwise
110 dnl LDFLAGS_STATIC=""
112 AC_MSG_CHECKING(flag used by libtool to link rpm)
113 if test X"$GCC" = Xyes ; then
115 *-*-solaris*) LDFLAGS_STATIC="-static";;
116 *-*-hpux*) LDFLAGS_STATIC="-static";;
117 *-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread.
118 *-*-*) LDFLAGS_STATIC="-all-static";;
120 elif test X"$CC" = Xcc ; then
122 *-*-linux*) LDFLAGS_STATIC="-all-static";;
123 *-*-freebsd*) LDFLAGS_STATIC="-all-static";;
124 *-*-osf*) LDFLAGS_STATIC="";; # OSF5 has no shared pthreads libs
125 *-*-aix*) LDFLAGS_STATIC="-static";; # -Wl,-bnso doesn't seem to work...
126 *-*-hpux*) LDFLAGS_STATIC="-static";;
127 *-*-solaris*) LDFLAGS_STATIC="-static";;
128 *-*-irix*) LDFLAGS_STATIC="-static";; #should be -non_shared, but can't
129 # link because of crt1.o then.
130 *-*-ultrix*) LDFLAGS_STATIC="-all-static";; #ultrix doesn't have shared libs.
131 *-*-*) LDFLAGS_STATIC="-static"
134 Unable to guess what option to pass to $CC to generate a static
135 executable. You will need to set the LDFLAGS_STATIC macro in Makefile.inc to
136 the appropriate argument(s) if you want to build a static rpm executable.
142 # just link it dynamically
145 LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}" # libtool format
146 AC_MSG_RESULT($LDFLAGS_STATIC)
147 AC_SUBST(LDFLAGS_STATIC)
150 dnl XXX Test for libpthread.a that is NPTL aware (static link only).
153 if test -f /usr/lib/nptl/libpthread.a ; then
154 LDFLAGS_NPTL="-L/usr/lib/nptl"
155 # INCPATH="$INCPATH -I/usr/include/nptl"
157 AC_SUBST(LDFLAGS_NPTL)
160 dnl look for POSIX chmod attributes
162 AC_MSG_CHECKING(POSIX chmod)
164 chmod 744 foo.chmodtest
165 chmod +X foo.chmodtest 2>/dev/null
166 a=`ls -l foo.chmodtest | awk '{print $1}'`
168 if test "$a" = "-rwxr-xr-x"; then
170 FIXPERMS=a+rX,g-w,o-w
172 AC_MSG_RESULT(no (tell your OS vendor about GNU fileutils))
178 dnl see if we have a mkdir that supports `-p'.
180 AC_PATH_PROGS(MKDIR, mkdir, mkdir)
181 AC_MSG_CHECKING(if $MKDIR supports -p)
183 $MKDIR -p conftest/a 2>/dev/null
184 if test $? = 0 ; then
185 rmdir conftest/a 2>/dev/null
186 if test $? = 0 ; then
192 rmdir conftest 2>/dev/null
193 if test $? = 0 ; then
202 if test X"$MKDIR_P" = X0 ; then
204 MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
209 dnl substitute this into config.h, so the C source picks it up.
211 AC_DEFINE_UNQUOTED(MKDIR_P, "${MKDIR_P}",
212 [A full path to a program, possibly with arguments, that will create a
213 directory and all necessary parent directories, ala `mkdir -p'])
218 dnl This test must precede tests of compiler characteristics like
219 dnl that for the inline keyword, since it may change the degree to
220 dnl which the compiler supports such features.
227 dnl AM_DISABLE_SHARED
230 AC_CHECK_TOOL(AR, ar, :)
233 dnl use defaults if cross-compiling, otherwise use the default path.
235 if test "$cross_compiling" = "yes"; then
238 # MYPATH="/bin:/usr/bin:/usr/local/bin:$PATH:/sbin:/usr/sbin:/usr/local/sbin:/opt/gnu/bin"
243 dnl Find some common programs
245 AC_PATH_PROG(BZIP2BIN, bzip2, /usr/bin/bzip2, $MYPATH)
246 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
247 AC_PATH_PROG(__CHGRP, chgrp, /bin/chgrp, $MYPATH)
248 AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH)
249 AC_PATH_PROG(__CHOWN, chown, /bin/chown, $MYPATH)
250 AC_PATH_PROG(__CP, cp, /bin/cp, $MYPATH)
251 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
252 AC_PATH_PROG(__FILE, file, /usr/bin/file, $MYPATH)
253 AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $MYPATH)
254 AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
255 AC_PATH_PROG(GZIPBIN, gzip, /bin/gzip, $MYPATH)
256 AC_PATH_PROG(UNZIPBIN, unzip, /usr/bin/unzip, $MYPATH)
258 AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
259 AC_MSG_CHECKING(checking whether id supports -u)
260 if ${__ID} -u 2>&1 > /dev/null ; then
264 dnl XXX Watchout for square brackets fed to m4.
265 __ID_U="%{__id} | %{__sed} 's/[[^=]]*=\\\\([[0-9]][[0-9]]*\\\\).*$/\\\\1/'"
270 AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
271 AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
272 AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
273 AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
274 AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
275 AC_MSG_CHECKING(old version of patch)
276 PATCHVERSION=`patch --version 2>&1`
278 if test "$PATCHVERSION" = "Patch version 2.1"; then
279 AC_DEFINE(HAVE_OLDPATCH_21, 1,
280 [Define if the patch call you'll be using is 2.1 or older])
281 AC_MSG_RESULT(patch older then 2.2 found)
283 AC_MSG_RESULT(patch later then 2.2 found)
286 AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
287 AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH)
288 AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
289 AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
290 AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
291 AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
292 AC_PATH_PROG(__SSH, ssh, /usr/bin/ssh, $MYPATH)
293 AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
295 AC_PATH_PROG(__LD, ld, /usr/bin/ld, $MYPATH)
296 AC_PATH_PROG(__NM, nm, /usr/bin/nm, $MYPATH)
297 AC_PATH_PROG(__OBJCOPY, objcopy, /usr/bin/objcopy, $MYPATH)
298 AC_PATH_PROG(__OBJDUMP, objdump, /usr/bin/objdump, $MYPATH)
299 AC_PATH_PROG(__STRIP, strip, /usr/bin/strip, $MYPATH)
305 *-*-solaris*) LIBS="$LIBS -L$l -R$l $*";;
306 *) LIBS="$LIBS -L$l $*";;
313 if test -d zlib ; then
314 WITH_ZLIB_SUBDIR=zlib
315 addlib \${top_builddir}/zlib
316 WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
317 INCPATH="$INCPATH -I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
318 WITH_ZLIB_LIB="\${top_builddir}/${WITH_ZLIB_SUBDIR}/libz.la"
319 AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])
321 AC_SUBST(WITH_ZLIB_SUBDIR)
322 AC_SUBST(WITH_ZLIB_INCLUDE)
323 AC_SUBST(WITH_ZLIB_LIB)
328 if test "$cross_compiling" != "yes"; then
329 dirs="$dirs /usr/local"
334 NONE|/usr) continue;;
336 if test X$localdone != X ; then continue; fi
341 AC_MSG_CHECKING(for $dir/lib in LIBS)
342 if test -d $dir/lib 2> /dev/null ; then
349 AC_MSG_CHECKING(for $dir/include in INCPATH)
350 if test -d $dir/include 2>/dev/null ; then
351 if [ "$dir" != "/usr/local" ] ; then
352 INCPATH="$INCPATH -I$dir/include"
360 AC_MSG_CHECKING(for /usr/ucblib in LIBS)
361 if test -d /usr/ucblib ; then
362 if test "$build" = "mips-sni-sysv4" ; then
363 addlib /usr/ccs/lib -lc
374 dnl Check for features
377 dnl Checks for libraries.
379 WITH_ELFUTILS_SUBDIR=
382 AC_CHECK_HEADER([libelf.h])
383 AC_CHECK_HEADER([gelf.h], [
384 AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
385 AC_CHECK_LIB(elf, gelf_getvernaux, [
386 AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
387 WITH_LIBELF_LIB="-lelf"
390 if test -d elfutils/libelf ; then
391 AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
392 AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
393 WITH_ELFUTILS_SUBDIR=elfutils
394 WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf"
395 WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a"
398 AC_SUBST(WITH_ELFUTILS_SUBDIR)
399 AC_SUBST(WITH_LIBELF_INCLUDE)
400 AC_SUBST(WITH_LIBELF_LIB)
402 WITH_LIBDWARF_INCLUDE=
403 AC_CHECK_HEADER([dwarf.h], [
404 AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
406 if test -d elfutils/libdwarf ; then
407 AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
408 WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
411 AC_SUBST(WITH_LIBDWARF_INCLUDE)
413 WITH_BEECRYPT_SUBDIR=
414 WITH_BEECRYPT_INCLUDE=
416 AC_CHECK_HEADER([beecrypt/beecrypt.h], [
417 AC_CHECK_LIB(beecrypt, mpfprintln, [
418 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
419 WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt"
420 WITH_BEECRYPT_LIB="-lbeecrypt"
423 if test -d beecrypt ; then
424 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
425 WITH_BEECRYPT_SUBDIR=beecrypt
426 WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
427 WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
430 AC_SUBST(WITH_BEECRYPT_SUBDIR)
431 AC_SUBST(WITH_BEECRYPT_INCLUDE)
432 AC_SUBST(WITH_BEECRYPT_LIB)
434 AC_CHECK_FUNC(setreuid, [], [
435 AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
438 AC_CHECK_FUNC(rand, [], [
439 AC_CHECK_LIB(rand, rand, [])
442 AC_CHECK_FUNC(getdomainname, [], [
443 AC_CHECK_LIB(nsl, getdomainname)
445 AC_CHECK_FUNC(socket, [], [
446 AC_CHECK_LIB(socket, socket)
449 AC_CHECK_HEADERS(error.h)
450 AC_CHECK_FUNCS(error)
451 AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
453 AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
454 dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
455 AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
456 AC_CHECK_LIB(thread, mutex_lock)
460 AC_CHECK_HEADERS(aio.h)
461 AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
463 dnl Better not use fchmod at all.
464 AC_CHECK_FUNC(fchmod)
466 AC_CHECK_FUNCS(vsnprintf snprintf)
468 dnl Temporary hack for MiNT. Some functions (writev, snprintf) are
469 dnl not in the libc but in libport (for political reasons). This check
470 dnl can hopefully be removed soon. Please use the default action
471 dnl for this macro (not LIBS=...), otherwise the check for dbopen
473 AC_CHECK_LIB(port, writev)
482 dnl Detect whether internal Berkeley DB should be built.
485 AC_ARG_WITH(db, [ --without-db do not use internal Berkeley db])
487 if test $withval = no ; then
488 dnl ------------------ without internal db
490 AC_CHECK_HEADERS(db3/db.h)
492 dnl Check for Berkeley db3 API.
493 AC_CHECK_FUNC(db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"],
494 AC_CHECK_LIB(db-3.2, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.2"],
495 AC_CHECK_LIB(db-3.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.1"],
496 AC_CHECK_LIB(db-3.0, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.0"],
497 AC_CHECK_LIB(db, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb"],
504 if test X"$DBLIBSRCS" = X; then
505 AC_MSG_ERROR([sorry rpm requires libdb-3.x.a (from the Berkeley db package)])
508 if test -n "$libdb3" -a -n "$libthread" ; then
509 AC_MSG_CHECKING(whether $libdb3 needs $libthread)
512 AC_TRY_LINK_FUNC(db_create, AC_MSG_RESULT(no),
513 [libdb3="$libdb3 $libthread"; AC_MSG_RESULT(yes)])
518 dnl ------------------ with internal db
519 AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
523 libdb3="# \$(top_builddir)/db3/libdb.la"
524 libdb3a="\$(top_builddir)/db3/libdb.a"
525 dnl INCPATH="-I\$(top_builddir)/$(WITH_DB_SUBDIR) $INCPATH"
528 AC_SUBST(WITH_DB_SUBDIR)
529 AC_SUBST(WITH_INTERNAL_DB)
531 DBLIBSRCS="$DBLIBSRCS"
532 DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
539 for dbi in $DBLIBSRCS; do
541 db3.c) AC_DEFINE(USE_DB3, 1, [Use the Berkeley db3 API?]) ;;
542 db1.c) AC_DEFINE(USE_DB1, 1, [Use the Berkeley db1 retrofit to db3 API?]) ;;
546 dnl AmigaOS and IXEmul have a fork() dummy
549 echo "Building for AmigaOS: using vfork() instead of fork()";
550 CFLAGS="$CFLAGS -Dfork=vfork"
554 if test -z "${WITH_ZLIB_LIB}" ; then
555 for zlib in z gz ; do
556 AC_CHECK_LIB(${zlib}, gzread,
557 [LIBS="$LIBS -l${zlib}"; break],
558 [if test ${zlib} = gz; then
559 AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)])
564 dnl zlib-1.0.4 has not gzseek
565 AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
568 AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
569 AC_CHECK_LIB(bz2, BZ2_bzread, [
572 AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0]) ],
578 dnl horrible *temporary* hack to make sure that if we found gettext() in
579 dnl -lintl that we add -lintl *back* to $LIBS.
581 if test X$gt_cv_func_gettext_libintl = Xyes ; then
585 dnl Checks for header files we can live without.
591 AC_CHECK_HEADERS(fcntl.h getopt.h grp.h memory.h netdb.h pwd.h utime.h)
593 AC_CHECK_HEADERS(sys/ipc.h sys/socket.h sys/select.h)
594 AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
595 AC_CHECK_HEADERS(sys/mman.h sys/resource.h sys/utsname.h sys/wait.h)
597 AC_CHECK_HEADERS(netinet/in_systm.h)
598 AC_CHECK_HEADERS(machine/types.h)
599 AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
600 AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h)
601 AC_CHECK_HEADERS(bzlib.h libio.h zlib.h)
602 AC_CHECK_HEADERS(err.h mcheck.h)
603 AC_CHECK_HEADERS(pthread.h)
605 dnl popt w float/double needs.
606 AC_CHECK_HEADERS(float.h)
608 AC_CHECK_HEADERS(glob.h)
610 dnl statfs portability fiddles.
612 dnl We should really emulate/steal sections of the statfs and struct statfs
613 dnl checks from GNU fileutils.
615 AC_MSG_CHECKING(for struct statfs)
617 dnl this is easier than nesting AC_TRY_COMPILEs...
619 found_struct_statfs=no
621 if test X$found_struct_statfs = Xno ; then
622 dnl Solaris 2.6+ wants to use statvfs
624 #ifdef HAVE_SYS_TYPES_H
625 #include <sys/types.h>
627 #include <sys/statvfs.h> ],
628 [struct statvfs sfs;],
629 [AC_MSG_RESULT(in sys/statvfs.h)
630 AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
631 [statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
632 found_struct_statfs=yes],
636 if test X$found_struct_statfs = Xno ; then
637 dnl first try including sys/vfs.h
639 #ifdef HAVE_SYS_TYPES_H
640 #include <sys/types.h>
642 #include <sys/vfs.h> ],
643 [struct statfs sfs;],
644 [AC_MSG_RESULT(in sys/vfs.h)
645 AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
646 found_struct_statfs=yes],
650 if test X$found_struct_statfs = Xno ; then
651 dnl ...next try including sys/mount.h
653 #ifdef HAVE_SYS_TYPES_H
654 #include <sys/types.h>
656 #ifdef HAVE_SYS_PARAM_H
657 #include <sys/param.h>
659 #include <sys/mount.h> ],
660 [struct statfs sfs;],
661 [AC_MSG_RESULT(in sys/mount.h)
662 AC_DEFINE(STATFS_IN_SYS_MOUNT, 1, [statfs in <sys/mount.h> (for Digital Unix 4.0D systems)])
663 found_struct_statfs=yes],
667 if test X$found_struct_statfs = Xno ; then
668 dnl ...still no joy. Try sys/statfs.h
670 #ifdef HAVE_SYS_TYPES_H
671 #include <sys/types.h>
673 #include <sys/statfs.h> ],
674 [struct statfs sfs;],
675 [AC_MSG_RESULT(in sys/statfs.h)
676 AC_DEFINE(STATFS_IN_SYS_STATFS, 1, [statfs in <sys/statfs.h> (for Irix 6.4 systems)])
677 found_struct_statfs=yes],
681 if test X$found_struct_statfs = Xno ; then
682 dnl ...no luck. Warn the user of impending doom.
683 AC_MSG_WARN(not found)
687 dnl if we found the struct, see if it has the f_bavail member. Some OSes
688 dnl don't, including IRIX 6.5+
690 if test X$found_struct_statfs = Xyes ; then
691 AC_MSG_CHECKING(for f_bavail member in struct statfs)
693 #ifdef HAVE_SYS_TYPES_H
694 #include <sys/types.h>
696 #if STATFS_IN_SYS_STATVFS
697 # include <sys/statvfs.h>
698 typedef struct statvfs STATFS_t;
700 typedef struct statfs STATFS_t;
701 # if STATFS_IN_SYS_VFS
702 # include <sys/vfs.h>
703 # elif STATFS_IN_SYS_MOUNT
704 # include <sys/mouht.h>
705 # elif STATFS_IN_SYS_STATFS
706 # include <sys/statfs.h>
712 AC_DEFINE(STATFS_HAS_F_BAVAIL, 1, [Define if struct statfs has the f_bavail member])],
717 if test X$found_struct_statfs = Xyes ; then
719 dnl now check to see if we have the 4-argument variant of statfs()
720 dnl this pretty much requires AC_TRY_RUN
722 AC_MSG_CHECKING([if statfs() requires 4 arguments])
724 #ifdef HAVE_SYS_TYPES_H
725 #include <sys/types.h>
727 #ifdef STATFS_IN_SYS_VFS
729 #elif STATFS_IN_SYS_MOUNT
730 #include <sys/mouht.h>
731 #elif STATFS_IN_SYS_STATFS
732 #include <sys/statfs.h>
736 exit (statfs(".", &sfs, sizeof(sfs), 0));
740 AC_DEFINE(STAT_STATFS4, 1, [Define if the statfs() call takes 4 arguments])],
748 dnl look for libc features
750 AC_MSG_CHECKING(if <netdb.h> defines h_errno)
751 AC_TRY_LINK([#include <netdb.h>],printf("%d",h_errno),PROVIDES_ERRNO=yes)
752 AC_MSG_RESULT($PROVIDES_ERRNO)
753 if test $PROVIDES_ERRNO = yes; then
754 AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
757 dnl If a system doesn't have S_IFSOCK, define it as 0 which will
758 dnl make S_ISSOCK always return false (nice, eh?)
759 AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
760 AC_TRY_LINK([#include <sys/stat.h>],printf("%d", S_IFSOCK),
761 HAS_S_IFSOCK=yes,HAS_S_IFSOCK=no)
762 AC_MSG_RESULT($HAS_S_IFSOCK)
763 if test $HAS_S_IFSOCK = yes; then
764 AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
767 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
768 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
769 AC_TRY_LINK([#include <sys/stat.h>],printf("%d", S_ISLNK(0755)),
770 HAS_S_ISLNK=yes,HAS_S_ISLNK=no)
771 AC_MSG_RESULT($HAS_S_ISLNK)
772 if test $HAS_S_ISLNK = yes; then
773 AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
776 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
777 AC_TRY_LINK([#include <sys/stat.h>],printf("%d", S_ISSOCK(0755)),
778 HAS_S_ISSOCK=yes,HAS_S_ISSOCK=no)
779 AC_MSG_RESULT($HAS_S_ISSOCK)
780 if test $HAS_S_ISSOCK = yes; then
781 AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
784 AC_MSG_CHECKING(if timezone is defined)
785 AC_TRY_LINK([#include <time.h>],printf("%ld", timezone),
786 HAS_TIMEZONE=yes,HAS_TIMEZONE=no)
787 AC_MSG_RESULT($HAS_TIMEZONE)
789 dnl Check for missing typedefs
796 dnl Checks for library functions.
800 dnl XXX AC_FUNC_MEMCMP
802 dnl XXX AC_TYPE_SIGNAL
803 dnl XXX AC_FUNC_STRCOLL
804 dnl XXX AC_FUNC_STRFTIME
805 dnl XXX AC_FUNC_UTIME_NULL
806 dnl XXX AC_FUNC_VFORK
807 dnl XXX AC_CHECK_FUNCS(gethostname mkdir mkfifo rmdir select uname)
809 AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath setenv)
810 AC_CHECK_FUNCS(stpcpy stpncpy strcspn)
811 AC_CHECK_FUNCS(strdup strerror strtol strtoul strspn strstr)
813 AC_CHECK_FUNCS(__secure_getenv)
815 AC_CHECK_FUNCS(regcomp)
820 dnl XXX Regex replacement isn't known to be needed yet.
822 dnl AC_ARG_WITH(regex, [ --with-regex use the GNU regex library ],
823 dnl [rpm_cv_regex=yes],
824 dnl [AC_CHECK_FUNCS(regcomp, rpm_cv_regex=no, rpm_cv_regex=yes)])
826 dnl if test $rpm_cv_regex = no ; then
827 dnl AC_MSG_CHECKING(whether the regexp library is broken)
829 dnl #include <unistd.h>
830 dnl #include <regex.h>
831 dnl main() { regex_t blah ; exit(regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0)); }],
832 dnl rpm_cv_regex_broken=no, rpm_cv_regex_broken=yes, rpm_cv_regex_broken=yes)
833 dnl AC_MSG_RESULT([$rpm_cv_regex_broken])
834 dnl if test $rpm_cv_regex_broken = yes ; then
835 dnl echo " --> using the included GNU regex instead." >&AC_FD_MSG
840 dnl if test $rpm_cv_regex = yes; then
841 dnl AC_DEFINE(USE_GNU_REGEX, 1)
846 dnl XXX Glob *is* broken on linux with libc5, solaris and possibly aix when
847 dnl %files gets something like
848 dnl /usr/*/locale/*/LC_MESSAGES/*.mo
849 dnl (Note: more than one asterisk in glob pattern.)
851 AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
853 [AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)])
855 if test $rpm_cv_glob = no ; then
856 AC_CACHE_CHECK([for GNU extensions to glob], rpm_cv_glob_ext, [
863 #include <sys/stat.h>
868 exit(glob("t/*/*.8", GLOB_PERIOD, NULL, &gl) || gl.gl_pathc < 1);
870 rpm_cv_glob_ext=yes, rpm_cv_glob_ext=no, rpm_cv_glob_ext=no)
873 if test "$rpm_cv_glob_ext" = no ; then
874 echo " --> using the included GNU glob instead." >&AC_FD_MSG
879 if test "$rpm_cv_glob" = yes; then
880 AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
885 dnl Auto-detect which python bindings should be built.
888 AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
890 WITH_PYTHON_VERSION=$withval
891 if test $withval = auto ; then
893 AC_MSG_CHECKING(for python 2.3)
895 #include <python2.3/Python.h>
897 exit(strncmp("2.3", PY_VERSION, 3));
899 withval=yes, withval=no, withval=yes)
900 AC_MSG_RESULT($withval)
901 if test $withval = yes ; then
902 WITH_PYTHON_VERSION="2.3"
905 AC_MSG_CHECKING(for python 2.2)
907 #include <python2.2/Python.h>
909 exit(strncmp("2.2", PY_VERSION, 3));
911 withval=yes, withval=no, withval=yes)
912 AC_MSG_RESULT($withval)
913 if test $withval = yes ; then
914 WITH_PYTHON_VERSION="2.2"
917 AC_MSG_CHECKING(for python 1.5.2)
919 #include <python1.5/Python.h>
921 exit(strcmp("1.5.2", PY_VERSION));
923 withval=yes, withval=no, withval=yes)
924 AC_MSG_RESULT($withval)
925 if test $withval = yes ; then
926 WITH_PYTHON_VERSION="1.5"
933 if test "$WITH_PYTHON_VERSION" != no ; then
934 WITH_PYTHON_SUBDIR=python
935 WITH_PYTHON_SUBPACKAGE=1
938 WITH_PYTHON_SUBPACKAGE=0
940 AC_SUBST(WITH_PYTHON_SUBDIR)
941 AC_SUBST(WITH_PYTHON_SUBPACKAGE)
942 AC_SUBST(WITH_PYTHON_VERSION)
944 AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
946 dnl Auto-detect whether doxygen generated API docs should be included.
949 AC_ARG_WITH(apidocs, [ --with-apidocs build rpm API docs ])
951 if test $withval = auto -a $__DOXYGEN != no ; then
953 elif test $withval = yes -a $__DOXYGEN = no ; then
954 AC_MSG_ERROR(--> rpm API docs needs doxygen in PATH)
957 if test $withval = yes; then
958 WITH_APIDOCS_TARGET=apidocs
963 AC_SUBST(WITH_APIDOCS_TARGET)
964 AC_SUBST(WITH_APIDOCS)
967 AC_ARG_WITH(dmalloc, [ --with-dmalloc build with dmalloc debugging support ])
968 if test $withval = yes ; then
969 AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
970 LIBS="$LIBS -ldmalloc"
974 AC_ARG_WITH(efence, [ --with-efence build with efence debugging support ])
975 if test $withval = yes ; then
976 AC_DEFINE(EFENCE, 1, [Build with libefence support?])
977 LIBS="$LIBS -lefence"
980 AC_CHECK_FUNCS(setlocale)
982 dnl XXX Solaris <= 2.6 only permits 8 chars in password.
983 AC_CHECK_FUNCS(getpassphrase)
985 AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
986 AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
987 AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [
988 AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r";
989 AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [
990 AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used])
991 AC_LIBOBJ(getmntent)])])])])
993 AC_CHECK_FUNC(lchown,
994 [__CHOWN_RHF="%{__chown} -Rhf"
995 __CHGRP_RHF="%{__chgrp} -Rhf"
996 AC_DEFINE(HAVE_LCHOWN, 1, [Define as 1 if you have lchown()])],
997 [__CHOWN_RHF="%{__chown} -Rf"
998 __CHGRP_RHF="%{__chgrp} -Rf"
999 dnl Does chown() follow symlinks? This should be a good enough test.
1000 AC_MSG_CHECKING(whether chown() follows symlinks)
1001 AC_ARG_ENABLE([broken-chown],
1002 [ --enable-broken-chown this system's chown follows symbolic links],
1003 result=$enableval, result=unknown)
1004 if echo "$build" | egrep "(aix)|(hpux)|(linux)" > /dev/null ; then
1006 elif echo "$build" | egrep "(nextstep)" > /dev/null ; then
1009 if test $result = unknown; then
1010 if test `${__ID} | cut -f2 -d\= | cut -f1 -d\(` = 0; then
1015 if test `ls -l foo | awk '{print $3}'` != "root"; then
1022 AC_MSG_CHECKING((cannot check by non-root user))
1027 AC_MSG_RESULT($result)
1028 if test $result = yes; then
1029 AC_DEFINE(CHOWN_FOLLOWS_SYMLINK, 1, [Define as 1 if chown() follows symlinks and you don't have lchown()])
1031 AC_SUBST(__CHOWN_RHF)
1032 AC_SUBST(__CHGRP_RHF)
1035 dnl figure out what root's primary group is
1037 AC_MSG_CHECKING(root's primary group)
1038 AC_TRY_RUN([#include <stdio.h>
1039 #include <sys/types.h>
1045 struct passwd *root = NULL;
1046 struct group *roots_group = NULL;
1047 FILE * tempfile = NULL;
1049 root = getpwuid( (uid_t) 0 );
1051 roots_group = getgrgid(root->pw_gid);
1052 if (roots_group != NULL) {
1053 tempfile = fopen("conftest_rootg", "w");
1054 if (tempfile != NULL) {
1055 fprintf(tempfile, "%s\n", roots_group->gr_name);
1063 }], ROOT_GROUP=`cat conftest_rootg`,
1064 ROOT_GROUP="root",ROOT_GROUP="root"
1066 AC_MSG_RESULT($ROOT_GROUP)
1067 AC_SUBST(ROOT_GROUP)
1069 if test "x$varprefix" = "x"; then
1070 # For /usr and /usr/local, we want the 'var' directory to go
1071 # in /var and /var/local respectively. For everything else,
1072 # just put the 'var' directory in prefix/var.
1075 varprefix=`echo $prefix | sed 's/usr/var/'` ;;
1077 varprefix=`echo $ac_default_prefix | sed 's/usr/var/'` ;;
1079 varprefix=$prefix/var ;;
1084 if test "x$tmpdir" = "x"; then
1085 if test -d $varprefix/tmp; then
1086 tmpdir=$varprefix/tmp
1088 if test -d /var/tmp; then
1097 if echo "$build_os" | grep sco > /dev/null; then
1098 echo "hacking things up for sco"
1099 AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
1100 AC_DEFINE(HAVE_STRUCT_MNTTAB, 1,
1101 [Define as 1 if you have "struct mnttab" (only sco?)])
1102 elif echo "$build_os" | grep sunos > /dev/null; then
1103 echo "hacking things up for sunos"
1104 CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
1105 AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
1106 AC_DEFINE(NEED_MYREALLOC, 1, [Define as 1 if we need myrealloc])
1107 AC_LIBOBJ(myrealloc)
1111 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
1113 if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
1114 build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
1116 if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
1117 build_os=`echo "${build_os}" | sed 's/-gnu$//'`
1121 build_os_exact="${build_os}"
1122 build_os_major=`echo "${build_os}" | sed 's/\..*$//'`
1123 build_os_noversion=`echo "${build_os}" | sed 's/[0-9]*\..*$//'`
1126 rm -f ./find-provides
1127 if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ; then
1128 echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov for automatic provides generation"
1129 ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ./find-provides
1130 elif test -f ${srcdir}/autodeps/${build_os_exact}.prov ; then
1131 echo "using ${srcdir}/autodeps/${build_os_exact}.prov for automatic provides generation"
1132 ln -s ${srcdir}/autodeps/${build_os_exact}.prov ./find-provides
1133 elif test -f ${srcdir}/autodeps/${build_os_major}.prov ; then
1134 echo "using ${srcdir}/autodeps/${build_os_major}.prov for automatic provides generation"
1135 ln -s ${srcdir}/autodeps/${build_os_major}.prov ./find-provides
1136 elif test -f ${srcdir}/autodeps/${build_os_noversion}.prov ; then
1137 echo "using ${srcdir}/autodeps/${build_os_noversion}.prov for automatic provides generation"
1138 ln -s ${srcdir}/autodeps/${build_os_noversion}.prov ./find-provides
1140 echo "*** no default provides information is available for ${build_os_noversion}"
1141 ln -s ${srcdir}/autodeps/none ./find-provides
1144 rm -f ./find-requires
1145 if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ; then
1146 echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req for automatic requires generation"
1147 ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ./find-requires
1148 elif test -f ${srcdir}/autodeps/${build_os_exact}.req ; then
1149 echo "using ${srcdir}/autodeps/${build_os_exact}.req for automatic requires generation"
1150 ln -s ${srcdir}/autodeps/${build_os_exact}.req ./find-requires
1151 elif test -f ${srcdir}/autodeps/${build_os_major}.req ; then
1152 echo "using ${srcdir}/autodeps/${build_os_major}.req for automatic requires generation"
1153 ln -s ${srcdir}/autodeps/${build_os_major}.req ./find-requires
1154 elif test -f ${srcdir}/autodeps/${build_os_noversion}.req ; then
1155 echo "using ${srcdir}/autodeps/${build_os_noversion}.req for automatic requires generation"
1156 ln -s ${srcdir}/autodeps/${build_os_noversion}.req ./find-requires
1158 echo "*** no default requires information is available for ${build_os_noversion}"
1159 ln -s ${srcdir}/autodeps/none ./find-requires
1162 dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
1164 case "${target_cpu}" in
1165 x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;;
1169 dnl Determine the canonical arch-vendor-os for the build machine
1170 autorelocate_path='%{nil}'
1171 case "${build_cpu}" in
1172 *86) RPMCANONCOLOR=0; RPMCANONARCH=i386 ;;
1173 x86_64*) RPMCANONCOLOR=3; RPMCANONARCH=x86_64 ;;
1174 alpha*) RPMCANONCOLOR=0; RPMCANONARCH=alpha ;;
1175 sparc*) RPMCANONCOLOR=0; RPMCANONARCH=sparc ;;
1176 ia64*) RPMCANONCOLOR=2; RPMCANONARCH=ia64;
1177 autorelocate_path='/emul/%%{ARCH}-%%{OS}' ;;
1178 s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s390x ;;
1179 s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
1180 powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
1181 powerpc*|ppc*) RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
1182 armv3l*) RPMCANONCOLOR=0; RPMCANONARCH=armv3l ;;
1183 armv4l*) RPMCANONCOLOR=0; RPMCANONARCH=armv4l ;;
1184 armv4b*) RPMCANONCOLOR=0; RPMCANONARCH=armv4b ;;
1185 arm*) RPMCANONCOLOR=0; RPMCANONARCH="${build_cpu}" ;;
1186 mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
1187 mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
1188 m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
1189 *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
1191 case "${build_os_noversion}" in
1192 mint) RPMCANONARCH=m68kmint ;;
1194 RPMCANONVENDOR="$build_vendor"
1195 case "${build_vendor}" in
1196 unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog)
1197 test -f /etc/redhat-release && RPMCANONVENDOR=redhat
1198 test -f /etc/pld-release && RPMCANONVENDOR=pld
1199 test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake
1200 test -f /etc/conectiva-release && RPMCANONVENDOR=conectiva
1201 test -f /etc/lvr-release && RPMCANONVENDOR=lvr
1202 test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog
1205 RPMCANONOS="$build_os_noversion"
1206 AC_SUBST(RPMCANONCOLOR)
1207 AC_SUBST(autorelocate_path)
1208 AC_SUBST(RPMCANONARCH)
1209 AC_SUBST(RPMCANONVENDOR)
1210 AC_SUBST(RPMCANONOS)
1212 if test X"$prefix" = XNONE ; then
1213 usrprefix="$ac_default_prefix"
1217 LOCALEDIR="`echo ${usrprefix}/share/locale`"
1218 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR",
1219 [Full path to rpm locale directory (usually /usr/share/locale)])
1221 LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
1223 RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
1224 AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR",
1225 [Full path to rpm global configuration directory (usually /usr/lib/rpm)])
1226 AC_SUBST(RPMCONFIGDIR)
1228 SYSCONFIGDIR="`echo /etc/rpm`"
1229 AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR",
1230 [Full path to rpm system configuration directory (usually /etc/rpm)])
1231 AC_SUBST(SYSCONFIGDIR)
1233 MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros"
1234 AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES",
1235 [Colon separated paths of macro files to read.])
1236 AC_SUBST(MACROFILES)
1238 LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
1239 AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
1240 [Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
1241 AC_SUBST(LIBRPMRC_FILENAME)
1243 VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
1244 AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
1245 [Full path to vendor rpmrc configuration file (usually /usr/lib/rpm/vendor/rpmrc)])
1246 AC_SUBST(VENDORRPMRC_FILENAME)
1248 LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}"
1249 AC_DEFINE_UNQUOTED(LIBRPMALIAS_FILENAME, "$LIBRPMALIAS_FILENAME",
1250 [Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)])
1251 AC_SUBST(LIBRPMALIAS_FILENAME)
1252 FINDREQUIRES="${RPMCONFIGDIR}/find-requires"
1253 AC_DEFINE_UNQUOTED(FINDREQUIRES, "$FINDREQUIRES",
1254 [Full path to find-requires script (usually /usr/lib/rpm/find-requires)])
1255 AC_SUBST(FINDREQUIRES)
1256 FINDPROVIDES="${RPMCONFIGDIR}/find-provides"
1257 AC_DEFINE_UNQUOTED(FINDPROVIDES, "$FINDPROVIDES",
1258 [Full path to find-provides script (usually /usr/lib/rpm/find-provides)])
1259 AC_SUBST(FINDPROVIDES)
1261 testdir="`pwd`/tests"
1262 dnl AC_DEFINE_UNQUOTED(testdir, "$testdir")
1272 dnl XXX this causes popt to depend on zlib et al
1273 dnl # XXX Propagate -lucb to popt ...
1274 dnl export LIBS INCPATH CONFIG_SITE
1276 AC_CONFIG_SUBDIRS(popt beecrypt zlib elfutils file db3)
1278 AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
1279 rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
1280 scripts/Makefile scripts/brp-redhat
1281 scripts/macros.perl scripts/macros.php scripts/macros.python
1283 tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
1284 misc/Makefile intl/Makefile po/Makefile.in
1294 python/rpmdb/Makefile
1295 python/rpmdb/test/Makefile
1297 python/mpw/test/Makefile
1298 ], [ echo timestamp > popt/stamp-h.in
1299 echo timestamp > beecrypt/stamp-h.in
1300 echo timestamp > stamp-h.in