3 ****************************************************************************
5 * *** WARNING WARNING WARNING *** *
7 * This is source code from the development branch of rpm-4.4. *
9 * If you want the "production" rpm-4.3.1 code, then you should use a *
10 * rpm-4.3.1 src.rpm. Alternatively, if using a CVS checkout, do *
13 * cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login *
14 * (no password, just carriage return) *
15 * cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel get rpm *
18 * Here's the rpm-4_3 branch, latest is rpm-4.3.1: *
21 * Here's the rpm-4_2 branch, latest is rpm-4.2.2: *
24 * Here's the rpm-4_1 branch, latest is rpm-4.1.1: *
27 * Here's the rpm-4_0 branch, latest is rpm-4.0.5: *
30 ****************************************************************************
35 AC_INIT(rpm, 4.4, rpm-list@redhat.com)
37 AC_CONFIG_SRCDIR([rpmqv.c])
38 AM_CONFIG_HEADER([config.h])
40 AM_INIT_AUTOMAKE([foreign])
42 dnl Set of available languages.
43 ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr"
45 dnl Checks for programs.
60 if test "$ac_cv_c_compiler_gnu" = yes; then
61 CFLAGS="$CFLAGS -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
65 AC_PROG_GCC_TRADITIONAL
68 dnl Does this platform require array notation to assign to a va_list?
69 dnl If cross-compiling, we assume va_list is "normal". If this breaks
70 dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
71 dnl also just to be sure.
72 AC_MSG_CHECKING(whether va_list assignments need array notation)
73 AC_CACHE_VAL(ac_cv_valistisarray,
74 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
76 void foo(int i, ...) {
80 if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
82 va_end(ap1); va_end(ap2);
84 int main() { foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
86 if test "$ac_cv_valistisarray" = true ; then
87 AC_DEFINE(HAVE_VA_LIST_AS_ARRAY, 1,
88 [Define as 1 if your va_list type is an array])
98 export RPMUSER RPMUID RPMGROUP RPMGID
104 AC_PATH_PROG(CTAGS, ctags, /bin/true)
105 AC_PATH_PROG(CSCOPE, cscope, /bin/true)
108 dnl This now uses libtool. Put
109 dnl LDFLAGS_STATIC="-all"
110 dnl to attempt static executables using libtool. Otherwise
111 dnl LDFLAGS_STATIC=""
113 AC_MSG_CHECKING(flag used by libtool to link rpm)
114 if test X"$GCC" = Xyes ; then
116 *-*-solaris*) LDFLAGS_STATIC="-static";;
117 *-*-hpux*) LDFLAGS_STATIC="-static";;
118 *-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread.
119 *-*-*) LDFLAGS_STATIC="-all-static";;
121 elif test X"$CC" = Xcc ; then
123 *-*-linux*) LDFLAGS_STATIC="-all-static";;
124 *-*-freebsd*) LDFLAGS_STATIC="-all-static";;
125 *-*-osf*) LDFLAGS_STATIC="";; # OSF5 has no shared pthreads libs
126 *-*-aix*) LDFLAGS_STATIC="-static";; # -Wl,-bnso doesn't seem to work...
127 *-*-hpux*) LDFLAGS_STATIC="-static";;
128 *-*-solaris*) LDFLAGS_STATIC="-static";;
129 *-*-irix*) LDFLAGS_STATIC="-static";; #should be -non_shared, but can't
130 # link because of crt1.o then.
131 *-*-ultrix*) LDFLAGS_STATIC="-all-static";; #ultrix doesn't have shared libs.
132 *-*-*) LDFLAGS_STATIC="-static"
135 Unable to guess what option to pass to $CC to generate a static
136 executable. You will need to set the LDFLAGS_STATIC macro in Makefile.inc to
137 the appropriate argument(s) if you want to build a static rpm executable.
143 # just link it dynamically
146 LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}" # libtool format
147 AC_MSG_RESULT($LDFLAGS_STATIC)
148 AC_SUBST(LDFLAGS_STATIC)
151 dnl XXX Test for libpthread.a that is NPTL aware (static link only).
154 if test -f /usr/lib/nptl/libpthread.a ; then
155 LDFLAGS_NPTL="-L/usr/lib/nptl"
156 # INCPATH="$INCPATH -I/usr/include/nptl"
158 AC_SUBST(LDFLAGS_NPTL)
161 dnl look for POSIX chmod attributes
163 AC_MSG_CHECKING(POSIX chmod)
165 chmod 744 foo.chmodtest
166 chmod +X foo.chmodtest 2>/dev/null
167 a=`ls -l foo.chmodtest | awk '{print $1}'`
169 if test "$a" = "-rwxr-xr-x"; then
171 FIXPERMS=a+rX,u+w,g-w,o-w
173 AC_MSG_RESULT(no (tell your OS vendor about GNU fileutils))
174 FIXPERMS=a+r,u+w,g-w,o-w
179 dnl see if we have a mkdir that supports `-p'.
181 AC_PATH_PROGS(MKDIR, mkdir, mkdir)
182 AC_MSG_CHECKING(if $MKDIR supports -p)
184 $MKDIR -p conftest/a 2>/dev/null
185 if test $? = 0 ; then
186 rmdir conftest/a 2>/dev/null
187 if test $? = 0 ; then
193 rmdir conftest 2>/dev/null
194 if test $? = 0 ; then
203 if test X"$MKDIR_P" = X0 ; then
205 MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
210 dnl substitute this into config.h, so the C source picks it up.
212 AC_DEFINE_UNQUOTED(MKDIR_P, "${MKDIR_P}",
213 [A full path to a program, possibly with arguments, that will create a
214 directory and all necessary parent directories, ala `mkdir -p'])
219 dnl This test must precede tests of compiler characteristics like
220 dnl that for the inline keyword, since it may change the degree to
221 dnl which the compiler supports such features.
224 dnl AM_DISABLE_SHARED
227 AC_CHECK_TOOL(AR, ar, :)
230 dnl use defaults if cross-compiling, otherwise use the default path.
232 if test "$cross_compiling" = "yes"; then
235 # MYPATH="/bin:/usr/bin:/usr/local/bin:$PATH:/sbin:/usr/sbin:/usr/local/sbin:/opt/gnu/bin"
240 dnl Find some common programs
242 AC_PATH_PROG(BZIP2BIN, bzip2, /usr/bin/bzip2, $MYPATH)
243 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
244 AC_PATH_PROG(__CHGRP, chgrp, /bin/chgrp, $MYPATH)
245 AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH)
246 AC_PATH_PROG(__CHOWN, chown, /bin/chown, $MYPATH)
247 AC_PATH_PROG(__CP, cp, /bin/cp, $MYPATH)
248 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
249 AC_PATH_PROG(__FILE, file, /usr/bin/file, $MYPATH)
250 AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $MYPATH)
251 AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
252 AC_PATH_PROG(GZIPBIN, gzip, /bin/gzip, $MYPATH)
253 AC_PATH_PROG(UNZIPBIN, unzip, /usr/bin/unzip, $MYPATH)
255 AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
256 AC_MSG_CHECKING(checking whether id supports -u)
257 if ${__ID} -u 2>&1 > /dev/null ; then
261 dnl XXX Watchout for square brackets fed to m4.
262 __ID_U="%{__id} | %{__sed} 's/[[^=]]*=\\\\([[0-9]][[0-9]]*\\\\).*$/\\\\1/'"
267 AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
268 AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
269 AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
270 AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
271 AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
272 AC_MSG_CHECKING(old version of patch)
273 PATCHVERSION=`patch --version 2>&1`
275 if test "$PATCHVERSION" = "Patch version 2.1"; then
276 AC_DEFINE(HAVE_OLDPATCH_21, 1,
277 [Define if the patch call you'll be using is 2.1 or older])
278 AC_MSG_RESULT(patch older then 2.2 found)
280 AC_MSG_RESULT(patch later then 2.2 found)
283 AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
284 AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH)
285 AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
286 AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
287 AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
288 AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
289 AC_PATH_PROG(__SSH, ssh, /usr/bin/ssh, $MYPATH)
290 AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
292 AC_PATH_PROG(__LD, ld, /usr/bin/ld, $MYPATH)
293 AC_PATH_PROG(__NM, nm, /usr/bin/nm, $MYPATH)
294 AC_PATH_PROG(__OBJCOPY, objcopy, /usr/bin/objcopy, $MYPATH)
295 AC_PATH_PROG(__OBJDUMP, objdump, /usr/bin/objdump, $MYPATH)
296 AC_PATH_PROG(__STRIP, strip, /usr/bin/strip, $MYPATH)
302 *-*-solaris*) LIBS="$LIBS -L$l -R$l $*";;
303 *) LIBS="$LIBS -L$l $*";;
310 if test -d zlib ; then
311 WITH_ZLIB_SUBDIR=zlib
312 addlib \${top_builddir}/zlib
313 WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
314 INCPATH="$INCPATH -I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
315 WITH_ZLIB_LIB="\${top_builddir}/${WITH_ZLIB_SUBDIR}/libz.la"
316 AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])
318 AC_SUBST(WITH_ZLIB_SUBDIR)
319 AC_SUBST(WITH_ZLIB_INCLUDE)
320 AC_SUBST(WITH_ZLIB_LIB)
325 if test "$cross_compiling" != "yes"; then
326 dirs="$dirs /usr/local"
331 NONE|/usr) continue;;
333 if test X$localdone != X ; then continue; fi
338 AC_MSG_CHECKING(for $dir/lib in LIBS)
339 if test -d $dir/lib 2> /dev/null ; then
346 AC_MSG_CHECKING(for $dir/include in INCPATH)
347 if test -d $dir/include 2>/dev/null ; then
348 if [ "$dir" != "/usr/local" ] ; then
349 INCPATH="$INCPATH -I$dir/include"
357 AC_MSG_CHECKING(for /usr/ucblib in LIBS)
358 if test -d /usr/ucblib ; then
359 if test "$build" = "mips-sni-sysv4" ; then
360 addlib /usr/ccs/lib -lc
371 dnl Check for features
374 dnl Checks for libraries.
376 WITH_ELFUTILS_SUBDIR=
379 AC_CHECK_HEADER([libelf.h])
380 AC_CHECK_HEADER([gelf.h], [
381 AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
382 AC_CHECK_LIB(elf, gelf_getvernaux, [
383 AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
384 WITH_LIBELF_LIB="-lelf"
387 if test -d elfutils/libelf ; then
388 AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
389 AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
390 WITH_ELFUTILS_SUBDIR=elfutils
391 WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf"
392 WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a"
395 AC_SUBST(WITH_ELFUTILS_SUBDIR)
396 AC_SUBST(WITH_LIBELF_INCLUDE)
397 AC_SUBST(WITH_LIBELF_LIB)
399 WITH_LIBDWARF_INCLUDE=
400 AC_CHECK_HEADER([dwarf.h], [
401 AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
403 if test -d elfutils/libdwarf ; then
404 AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
405 WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
408 AC_SUBST(WITH_LIBDWARF_INCLUDE)
410 WITH_BEECRYPT_SUBDIR=
411 WITH_BEECRYPT_INCLUDE=
413 AC_CHECK_HEADER([beecrypt/beecrypt.h], [
414 AC_CHECK_LIB(beecrypt, mpfprintln, [
415 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
416 WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt"
417 WITH_BEECRYPT_LIB="-lbeecrypt"
420 if test -d beecrypt ; then
421 AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
422 WITH_BEECRYPT_SUBDIR=beecrypt
423 WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
424 WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
427 AC_SUBST(WITH_BEECRYPT_SUBDIR)
428 AC_SUBST(WITH_BEECRYPT_INCLUDE)
429 AC_SUBST(WITH_BEECRYPT_LIB)
431 AC_CHECK_FUNC(setreuid, [], [
432 AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
435 AC_CHECK_FUNC(rand, [], [
436 AC_CHECK_LIB(rand, rand, [])
439 AC_CHECK_FUNC(getdomainname, [], [
440 AC_CHECK_LIB(nsl, getdomainname)
442 AC_CHECK_FUNC(socket, [], [
443 AC_CHECK_LIB(socket, socket)
446 AC_CHECK_HEADERS(error.h)
447 AC_CHECK_FUNCS(error)
449 AC_CHECK_HEADERS(poll.h)
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)
475 dnl ------------------ with internal db
476 AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
481 AC_SUBST(WITH_DB_SUBDIR)
482 AC_SUBST(WITH_INTERNAL_DB)
484 DBLIBSRCS="$DBLIBSRCS"
485 DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
490 dnl AmigaOS and IXEmul have a fork() dummy
493 echo "Building for AmigaOS: using vfork() instead of fork()";
494 CFLAGS="$CFLAGS -Dfork=vfork"
498 if test -z "${WITH_ZLIB_LIB}" ; then
499 for zlib in z gz ; do
500 AC_CHECK_LIB(${zlib}, gzread,
501 [LIBS="$LIBS -l${zlib}"; break],
502 [if test ${zlib} = gz; then
503 AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)])
508 dnl zlib-1.0.4 has not gzseek
509 AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
512 AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
513 AC_CHECK_LIB(bz2, BZ2_bzread, [
516 AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0]) ],
522 dnl horrible *temporary* hack to make sure that if we found gettext() in
523 dnl -lintl that we add -lintl *back* to $LIBS.
525 if test X$gt_cv_func_gettext_libintl = Xyes ; then
529 dnl Checks for header files we can live without.
535 AC_CHECK_HEADERS(fcntl.h getopt.h grp.h memory.h netdb.h pwd.h utime.h)
537 AC_CHECK_HEADERS(sys/ipc.h sys/socket.h sys/select.h)
538 AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
539 AC_CHECK_HEADERS(sys/mman.h sys/resource.h sys/utsname.h sys/wait.h)
541 AC_CHECK_HEADERS(netinet/in_systm.h)
542 AC_CHECK_HEADERS(machine/types.h)
543 AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
544 AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h)
545 AC_CHECK_HEADERS(bzlib.h libio.h zlib.h)
546 AC_CHECK_HEADERS(err.h mcheck.h)
547 AC_CHECK_HEADERS(pthread.h)
549 dnl popt w float/double needs.
550 AC_CHECK_HEADERS(float.h)
552 AC_CHECK_HEADERS(glob.h)
554 dnl statfs portability fiddles.
556 dnl We should really emulate/steal sections of the statfs and struct statfs
557 dnl checks from GNU fileutils.
559 AC_MSG_CHECKING(for struct statfs)
561 dnl this is easier than nesting AC_TRY_COMPILEs...
563 found_struct_statfs=no
565 if test X$found_struct_statfs = Xno ; then
566 dnl Solaris 2.6+ wants to use statvfs
567 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
568 #ifdef HAVE_SYS_TYPES_H
569 #include <sys/types.h>
571 #include <sys/statvfs.h> ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h)
572 AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
573 [statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
574 found_struct_statfs=yes],[])
577 if test X$found_struct_statfs = Xno ; then
578 dnl first try including sys/vfs.h
579 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
580 #ifdef HAVE_SYS_TYPES_H
581 #include <sys/types.h>
583 #include <sys/vfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h)
584 AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
585 found_struct_statfs=yes],[])
588 if test X$found_struct_statfs = Xno ; then
589 dnl ...next try including sys/mount.h
590 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
591 #ifdef HAVE_SYS_TYPES_H
592 #include <sys/types.h>
594 #ifdef HAVE_SYS_PARAM_H
595 #include <sys/param.h>
597 #include <sys/mount.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/mount.h)
598 AC_DEFINE(STATFS_IN_SYS_MOUNT, 1, [statfs in <sys/mount.h> (for Digital Unix 4.0D systems)])
599 found_struct_statfs=yes],[])
602 if test X$found_struct_statfs = Xno ; then
603 dnl ...still no joy. Try sys/statfs.h
604 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
605 #ifdef HAVE_SYS_TYPES_H
606 #include <sys/types.h>
608 #include <sys/statfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/statfs.h)
609 AC_DEFINE(STATFS_IN_SYS_STATFS, 1, [statfs in <sys/statfs.h> (for Irix 6.4 systems)])
610 found_struct_statfs=yes],[])
613 if test X$found_struct_statfs = Xno ; then
614 dnl ...no luck. Warn the user of impending doom.
615 AC_MSG_WARN(not found)
619 dnl if we found the struct, see if it has the f_bavail member. Some OSes
620 dnl don't, including IRIX 6.5+
622 if test X$found_struct_statfs = Xyes ; then
623 AC_MSG_CHECKING(for f_bavail member in struct statfs)
624 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
625 #ifdef HAVE_SYS_TYPES_H
626 #include <sys/types.h>
628 #if STATFS_IN_SYS_STATVFS
629 # include <sys/statvfs.h>
630 typedef struct statvfs STATFS_t;
632 typedef struct statfs STATFS_t;
633 # if STATFS_IN_SYS_VFS
634 # include <sys/vfs.h>
635 # elif STATFS_IN_SYS_MOUNT
636 # include <sys/mouht.h>
637 # elif STATFS_IN_SYS_STATFS
638 # include <sys/statfs.h>
640 #endif ]], [[STATFS_t sfs;
641 sfs.f_bavail = 0;]])],[AC_MSG_RESULT(yes)
642 AC_DEFINE(STATFS_HAS_F_BAVAIL, 1, [Define if struct statfs has the f_bavail member])],[AC_MSG_RESULT(no)
646 if test X$found_struct_statfs = Xyes ; then
648 dnl now check to see if we have the 4-argument variant of statfs()
649 dnl this pretty much requires AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[])
651 AC_MSG_CHECKING([if statfs() requires 4 arguments])
652 AC_RUN_IFELSE([AC_LANG_SOURCE([[
653 #ifdef HAVE_SYS_TYPES_H
654 #include <sys/types.h>
656 #ifdef STATFS_IN_SYS_VFS
658 #elif STATFS_IN_SYS_MOUNT
659 #include <sys/mouht.h>
660 #elif STATFS_IN_SYS_STATFS
661 #include <sys/statfs.h>
665 exit (statfs(".", &sfs, sizeof(sfs), 0));
667 ]])],[AC_MSG_RESULT(yes)
668 AC_DEFINE(STAT_STATFS4, 1, [Define if the statfs() call takes 4 arguments])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)
674 dnl look for libc features
676 AC_MSG_CHECKING(if <netdb.h> defines h_errno)
677 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
678 AC_MSG_RESULT($PROVIDES_ERRNO)
679 if test $PROVIDES_ERRNO = yes; then
680 AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
683 dnl If a system doesn't have S_IFSOCK, define it as 0 which will
684 dnl make S_ISSOCK always return false (nice, eh?)
685 AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
686 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
687 AC_MSG_RESULT($HAS_S_IFSOCK)
688 if test $HAS_S_IFSOCK = yes; then
689 AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
692 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
693 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
694 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
695 AC_MSG_RESULT($HAS_S_ISLNK)
696 if test $HAS_S_ISLNK = yes; then
697 AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
700 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
701 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
702 AC_MSG_RESULT($HAS_S_ISSOCK)
703 if test $HAS_S_ISSOCK = yes; then
704 AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
707 AC_MSG_CHECKING(if timezone is defined)
708 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
709 AC_MSG_RESULT($HAS_TIMEZONE)
711 dnl Check for missing typedefs
717 dnl Checks for library functions.
721 dnl XXX AC_FUNC_MEMCMP
723 dnl XXX AC_TYPE_SIGNAL
724 dnl XXX AC_FUNC_STRCOLL
725 dnl XXX AC_FUNC_STRFTIME
726 dnl XXX AC_FUNC_UTIME_NULL
727 dnl XXX AC_FUNC_FORK([])
728 dnl XXX AC_CHECK_FUNCS(gethostname mkdir mkfifo rmdir select uname)
730 AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath setenv)
731 AC_CHECK_FUNCS(stpcpy stpncpy strcspn)
732 AC_CHECK_FUNCS(strdup strerror strtol strtoul strspn strstr)
734 AC_CHECK_FUNCS(__secure_getenv)
736 AC_CHECK_FUNCS(regcomp)
740 AC_CHECK_FUNCS(mkstemp)
743 dnl XXX Regex replacement isn't known to be needed yet.
745 dnl AC_ARG_WITH(regex, [ --with-regex use the GNU regex library ],
746 dnl [rpm_cv_regex=yes],
747 dnl [AC_CHECK_FUNCS(regcomp, rpm_cv_regex=no, rpm_cv_regex=yes)])
749 dnl if test $rpm_cv_regex = no ; then
750 dnl AC_MSG_CHECKING(whether the regexp library is broken)
751 dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[
752 dnl #include <unistd.h>
753 dnl #include <regex.h>
754 dnl main() { regex_t blah ; exit(regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0)); }]])],[dnl rpm_cv_regex_broken=no],[rpm_cv_regex_broken=yes],[rpm_cv_regex_broken=yes])
755 dnl AC_MSG_RESULT([$rpm_cv_regex_broken])
756 dnl if test $rpm_cv_regex_broken = yes ; then
757 dnl echo " --> using the included GNU regex instead." >&AS_MESSAGE_FD([])
762 dnl if test $rpm_cv_regex = yes; then
763 dnl AC_DEFINE(USE_GNU_REGEX, 1)
768 dnl XXX Glob *is* broken on linux with libc5, solaris and possibly aix when
769 dnl %files gets something like
770 dnl /usr/*/locale/*/LC_MESSAGES/*.mo
771 dnl (Note: more than one asterisk in glob pattern.)
773 AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
775 [AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)])
777 if test $rpm_cv_glob = no ; then
778 AC_CACHE_CHECK([for GNU extensions to glob], rpm_cv_glob_ext, [
783 AC_RUN_IFELSE([AC_LANG_SOURCE([[
785 #include <sys/stat.h>
790 exit(glob("t/*/*.8", GLOB_PERIOD, NULL, &gl) || gl.gl_pathc < 1);
791 } ]])],[rpm_cv_glob_ext=yes],[rpm_cv_glob_ext=no],[rpm_cv_glob_ext=no])
794 if test "$rpm_cv_glob_ext" = no ; then
795 echo " --> using the included GNU glob instead." >&AS_MESSAGE_FD([])
800 if test "$rpm_cv_glob" = yes; then
801 AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
806 dnl Auto-detect which python bindings should be built.
809 AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
811 WITH_PYTHON_VERSION=$withval
812 if test $withval = auto ; then
814 AC_MSG_CHECKING(for python 2.3)
815 AC_RUN_IFELSE([AC_LANG_SOURCE([[
816 #include <python2.3/Python.h>
818 exit(strncmp("2.3", PY_VERSION, 3));
819 } ]])],[withval=yes],[withval=no],[withval=yes])
820 AC_MSG_RESULT($withval)
821 if test $withval = yes ; then
822 WITH_PYTHON_VERSION="2.3"
825 AC_MSG_CHECKING(for python 2.2)
826 AC_RUN_IFELSE([AC_LANG_SOURCE([[
827 #include <python2.2/Python.h>
829 exit(strncmp("2.2", PY_VERSION, 3));
830 } ]])],[withval=yes],[withval=no],[withval=yes])
831 AC_MSG_RESULT($withval)
832 if test $withval = yes ; then
833 WITH_PYTHON_VERSION="2.2"
836 AC_MSG_CHECKING(for python 1.5.2)
837 AC_RUN_IFELSE([AC_LANG_SOURCE([[
838 #include <python1.5/Python.h>
840 exit(strcmp("1.5.2", PY_VERSION));
841 } ]])],[withval=yes],[withval=no],[withval=yes])
842 AC_MSG_RESULT($withval)
843 if test $withval = yes ; then
844 WITH_PYTHON_VERSION="1.5"
851 if test "$WITH_PYTHON_VERSION" != no ; then
852 WITH_PYTHON_SUBDIR=python
853 WITH_PYTHON_SUBPACKAGE=1
856 WITH_PYTHON_SUBPACKAGE=0
858 AC_SUBST(WITH_PYTHON_SUBDIR)
859 AC_SUBST(WITH_PYTHON_SUBPACKAGE)
860 AC_SUBST(WITH_PYTHON_VERSION)
862 AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
864 dnl Auto-detect whether doxygen generated API docs should be included.
867 AC_ARG_WITH(apidocs, [ --with-apidocs build rpm API docs ])
869 if test $withval = auto -a $__DOXYGEN != no ; then
871 elif test $withval = yes -a $__DOXYGEN = no ; then
872 AC_MSG_ERROR(--> rpm API docs needs doxygen in PATH)
877 AC_ARG_WITH(selinux, [ --with-selinux build with selinux support ])
878 if test $withval != no ; then
879 AC_DEFINE(WITH_SELINUX, 1, [Build with selinux support?])
880 WITH_SELINUX_LIB="-lselinux"
882 AC_SUBST(WITH_SELINUX_LIB)
884 if test $withval = yes; then
885 WITH_APIDOCS_TARGET=apidocs
890 AC_SUBST(WITH_APIDOCS_TARGET)
891 AC_SUBST(WITH_APIDOCS)
894 AC_ARG_WITH(dmalloc, [ --with-dmalloc build with dmalloc debugging support ])
895 if test $withval = yes ; then
896 AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
897 LIBS="$LIBS -ldmalloc"
901 AC_ARG_WITH(efence, [ --with-efence build with efence debugging support ])
902 if test $withval = yes ; then
903 AC_DEFINE(EFENCE, 1, [Build with libefence support?])
904 LIBS="$LIBS -lefence"
907 AC_CHECK_FUNCS(setlocale)
909 dnl XXX Solaris <= 2.6 only permits 8 chars in password.
910 AC_CHECK_FUNCS(getpassphrase)
912 AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
913 AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
914 AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [
915 AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r";
916 AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [
917 AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used])
918 AC_LIBOBJ(getmntent)])])])])
920 AC_CHECK_FUNC(lchown,
921 [__CHOWN_RHF="%{__chown} -Rhf"
922 __CHGRP_RHF="%{__chgrp} -Rhf"
923 AC_DEFINE(HAVE_LCHOWN, 1, [Define as 1 if you have lchown()])],
924 [__CHOWN_RHF="%{__chown} -Rf"
925 __CHGRP_RHF="%{__chgrp} -Rf"
926 dnl Does chown() follow symlinks? This should be a good enough test.
927 AC_MSG_CHECKING(whether chown() follows symlinks)
928 AC_ARG_ENABLE([broken-chown],
929 [ --enable-broken-chown this system's chown follows symbolic links],
930 result=$enableval, result=unknown)
931 if echo "$build" | egrep "(aix)|(hpux)|(linux)" > /dev/null ; then
933 elif echo "$build" | egrep "(nextstep)" > /dev/null ; then
936 if test $result = unknown; then
937 if test `${__ID} | cut -f2 -d\= | cut -f1 -d\(` = 0; then
942 if test `ls -l foo | awk '{print $3}'` != "root"; then
949 AC_MSG_CHECKING((cannot check by non-root user))
954 AC_MSG_RESULT($result)
955 if test $result = yes; then
956 AC_DEFINE(CHOWN_FOLLOWS_SYMLINK, 1, [Define as 1 if chown() follows symlinks and you don't have lchown()])
958 AC_SUBST(__CHOWN_RHF)
959 AC_SUBST(__CHGRP_RHF)
962 dnl figure out what root's primary group is
964 AC_MSG_CHECKING(root's primary group)
965 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
966 #include <sys/types.h>
972 struct passwd *root = NULL;
973 struct group *roots_group = NULL;
974 FILE * tempfile = NULL;
976 root = getpwuid( (uid_t) 0 );
978 roots_group = getgrgid(root->pw_gid);
979 if (roots_group != NULL) {
980 tempfile = fopen("conftest_rootg", "w");
981 if (tempfile != NULL) {
982 fprintf(tempfile, "%s\n", roots_group->gr_name);
990 }]])],[ROOT_GROUP=`cat conftest_rootg`],[ROOT_GROUP="root"],[ROOT_GROUP="root"
992 AC_MSG_RESULT($ROOT_GROUP)
995 if test "x$varprefix" = "x"; then
996 # For /usr and /usr/local, we want the 'var' directory to go
997 # in /var and /var/local respectively. For everything else,
998 # just put the 'var' directory in prefix/var.
1001 varprefix=`echo $prefix | sed 's/usr/var/'` ;;
1003 varprefix=`echo $ac_default_prefix | sed 's/usr/var/'` ;;
1005 varprefix=$prefix/var ;;
1010 if test "x$tmpdir" = "x"; then
1011 if test -d $varprefix/tmp; then
1012 tmpdir=$varprefix/tmp
1014 if test -d /var/tmp; then
1023 if echo "$build_os" | grep sco > /dev/null; then
1024 echo "hacking things up for sco"
1025 AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
1026 AC_DEFINE(HAVE_STRUCT_MNTTAB, 1,
1027 [Define as 1 if you have "struct mnttab" (only sco?)])
1028 elif echo "$build_os" | grep sunos > /dev/null; then
1029 echo "hacking things up for sunos"
1030 CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
1031 AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
1032 AC_DEFINE(NEED_MYREALLOC, 1, [Define as 1 if we need myrealloc])
1033 AC_LIBOBJ(myrealloc)
1037 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
1039 if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
1040 build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
1042 if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
1043 build_os=`echo "${build_os}" | sed 's/-gnu$//'`
1047 build_os_exact="${build_os}"
1048 build_os_major=`echo "${build_os}" | sed 's/\..*$//'`
1049 build_os_noversion=`echo "${build_os}" | sed 's/[0-9]*\..*$//'`
1052 rm -f ./find-provides
1053 if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ; then
1054 echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov for automatic provides generation"
1055 ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ./find-provides
1056 elif test -f ${srcdir}/autodeps/${build_os_exact}.prov ; then
1057 echo "using ${srcdir}/autodeps/${build_os_exact}.prov for automatic provides generation"
1058 ln -s ${srcdir}/autodeps/${build_os_exact}.prov ./find-provides
1059 elif test -f ${srcdir}/autodeps/${build_os_major}.prov ; then
1060 echo "using ${srcdir}/autodeps/${build_os_major}.prov for automatic provides generation"
1061 ln -s ${srcdir}/autodeps/${build_os_major}.prov ./find-provides
1062 elif test -f ${srcdir}/autodeps/${build_os_noversion}.prov ; then
1063 echo "using ${srcdir}/autodeps/${build_os_noversion}.prov for automatic provides generation"
1064 ln -s ${srcdir}/autodeps/${build_os_noversion}.prov ./find-provides
1066 echo "*** no default provides information is available for ${build_os_noversion}"
1067 ln -s ${srcdir}/autodeps/none ./find-provides
1070 rm -f ./find-requires
1071 if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ; then
1072 echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req for automatic requires generation"
1073 ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ./find-requires
1074 elif test -f ${srcdir}/autodeps/${build_os_exact}.req ; then
1075 echo "using ${srcdir}/autodeps/${build_os_exact}.req for automatic requires generation"
1076 ln -s ${srcdir}/autodeps/${build_os_exact}.req ./find-requires
1077 elif test -f ${srcdir}/autodeps/${build_os_major}.req ; then
1078 echo "using ${srcdir}/autodeps/${build_os_major}.req for automatic requires generation"
1079 ln -s ${srcdir}/autodeps/${build_os_major}.req ./find-requires
1080 elif test -f ${srcdir}/autodeps/${build_os_noversion}.req ; then
1081 echo "using ${srcdir}/autodeps/${build_os_noversion}.req for automatic requires generation"
1082 ln -s ${srcdir}/autodeps/${build_os_noversion}.req ./find-requires
1084 echo "*** no default requires information is available for ${build_os_noversion}"
1085 ln -s ${srcdir}/autodeps/none ./find-requires
1088 dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
1090 case "${target_cpu}" in
1091 x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;;
1095 dnl Determine the canonical arch-vendor-os for the build machine
1096 autorelocate_path='%{nil}'
1097 case "${build_cpu}" in
1098 *86) RPMCANONCOLOR=0; RPMCANONARCH=i386 ;;
1099 ia32e*) RPMCANONCOLOR=3; RPMCANONARCH=ia32e ;;
1100 amd64*) RPMCANONCOLOR=3; RPMCANONARCH=amd64 ;;
1101 x86_64*) RPMCANONCOLOR=3; RPMCANONARCH=x86_64 ;;
1102 alpha*) RPMCANONCOLOR=0; RPMCANONARCH=alpha ;;
1103 sparc64*) RPMCANONCOLOR=3; RPMCANONARCH=sparc64 ;;
1104 sparc*) RPMCANONCOLOR=3; RPMCANONARCH=sparc ;;
1105 ia64*) RPMCANONCOLOR=2; RPMCANONARCH=ia64;
1106 autorelocate_path='/emul/%%{ARCH}-%%{OS}' ;;
1107 s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s390x ;;
1108 s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
1109 powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
1110 powerpc*|ppc*) RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
1111 armv3l*) RPMCANONCOLOR=0; RPMCANONARCH=armv3l ;;
1112 armv4l*) RPMCANONCOLOR=0; RPMCANONARCH=armv4l ;;
1113 armv4b*) RPMCANONCOLOR=0; RPMCANONARCH=armv4b ;;
1114 arm*) RPMCANONCOLOR=0; RPMCANONARCH="${build_cpu}" ;;
1115 mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
1116 mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
1117 m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
1118 *) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
1120 case "${build_os_noversion}" in
1121 mint) RPMCANONARCH=m68kmint ;;
1123 RPMCANONVENDOR="$build_vendor"
1124 case "${build_vendor}" in
1125 unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos)
1126 test -f /etc/redhat-release && RPMCANONVENDOR=redhat
1127 test -f /etc/pld-release && RPMCANONVENDOR=pld
1128 test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake
1129 test -f /etc/conectiva-release && RPMCANONVENDOR=conectiva
1130 test -f /etc/lvr-release && RPMCANONVENDOR=lvr
1131 test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog
1132 test -f /etc/caos-release && RPMCANONVENDOR=caos
1135 RPMCANONOS="$build_os_noversion"
1136 AC_SUBST(RPMCANONCOLOR)
1137 AC_SUBST(autorelocate_path)
1138 AC_SUBST(RPMCANONARCH)
1139 AC_SUBST(RPMCANONVENDOR)
1140 AC_SUBST(RPMCANONOS)
1142 if test X"$prefix" = XNONE ; then
1143 usrprefix="$ac_default_prefix"
1147 LOCALEDIR="`echo ${usrprefix}/share/locale`"
1148 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR",
1149 [Full path to rpm locale directory (usually /usr/share/locale)])
1151 LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
1153 RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
1154 AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR",
1155 [Full path to rpm global configuration directory (usually /usr/lib/rpm)])
1156 AC_SUBST(RPMCONFIGDIR)
1158 SYSCONFIGDIR="`echo /etc/rpm`"
1159 AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR",
1160 [Full path to rpm system configuration directory (usually /etc/rpm)])
1161 AC_SUBST(SYSCONFIGDIR)
1163 MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros"
1164 AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES",
1165 [Colon separated paths of macro files to read.])
1166 AC_SUBST(MACROFILES)
1168 LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
1169 AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
1170 [Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
1171 AC_SUBST(LIBRPMRC_FILENAME)
1173 VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
1174 AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
1175 [Full path to vendor rpmrc configuration file (usually /usr/lib/rpm/vendor/rpmrc)])
1176 AC_SUBST(VENDORRPMRC_FILENAME)
1178 LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}"
1179 AC_DEFINE_UNQUOTED(LIBRPMALIAS_FILENAME, "$LIBRPMALIAS_FILENAME",
1180 [Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)])
1181 AC_SUBST(LIBRPMALIAS_FILENAME)
1182 FINDREQUIRES="${RPMCONFIGDIR}/find-requires"
1183 AC_DEFINE_UNQUOTED(FINDREQUIRES, "$FINDREQUIRES",
1184 [Full path to find-requires script (usually /usr/lib/rpm/find-requires)])
1185 AC_SUBST(FINDREQUIRES)
1186 FINDPROVIDES="${RPMCONFIGDIR}/find-provides"
1187 AC_DEFINE_UNQUOTED(FINDPROVIDES, "$FINDPROVIDES",
1188 [Full path to find-provides script (usually /usr/lib/rpm/find-provides)])
1189 AC_SUBST(FINDPROVIDES)
1191 testdir="`pwd`/tests"
1192 dnl AC_DEFINE_UNQUOTED(testdir, "$testdir")
1202 dnl XXX this causes popt to depend on zlib et al
1203 dnl # XXX Propagate -lucb to popt ...
1204 dnl export LIBS INCPATH CONFIG_SITE
1206 AC_CONFIG_SUBDIRS(popt beecrypt zlib elfutils file db3)
1208 AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
1209 rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
1210 scripts/Makefile scripts/brp-redhat
1211 scripts/macros.perl scripts/macros.php scripts/macros.python
1213 tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
1214 misc/Makefile intl/Makefile po/Makefile.in
1224 python/rpmdb/Makefile
1225 python/rpmdb/test/Makefile
1228 AC_CONFIG_COMMANDS([default],[[ echo timestamp > popt/stamp-h.in
1229 echo timestamp > stamp-h.in