1996-08-20 01:15:47 +08:00
|
|
|
|
2003-03-11 07:28:24 +08:00
|
|
|
echo "
|
|
|
|
****************************************************************************
|
|
|
|
* *
|
|
|
|
* *** WARNING WARNING WARNING *** *
|
|
|
|
* *
|
2003-03-21 07:42:05 +08:00
|
|
|
* This is source code from the development branch of rpm-4.3. *
|
2003-03-11 07:28:24 +08:00
|
|
|
* *
|
2003-11-24 03:50:52 +08:00
|
|
|
* If you want the "production" rpm-4.2.1 code, then you should use a *
|
|
|
|
* rpm-4.2.1 src.rpm. Alternatively, if using a CVS checkout, do *
|
|
|
|
* the following: *
|
2003-03-11 07:28:24 +08:00
|
|
|
* *
|
|
|
|
* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel login *
|
|
|
|
* (no password, just carriage return) *
|
|
|
|
* cvs -d :pserver:anonymous@cvs.rpm.org:/cvs/devel get rpm *
|
|
|
|
* cd rpm *
|
|
|
|
* *
|
2003-03-28 05:53:39 +08:00
|
|
|
* Here's the rpm-4_2 branch, latest is rpm-4.2.1: *
|
2003-03-11 07:28:24 +08:00
|
|
|
* cvs up -r rpm-4_2 *
|
|
|
|
* *
|
|
|
|
* Here's the rpm-4_1 branch, latest is rpm-4.1.1: *
|
|
|
|
* cvs up -r rpm-4_1 *
|
|
|
|
* *
|
2003-03-25 01:25:42 +08:00
|
|
|
* Here's the rpm-4_0 branch, latest is rpm-4.0.5: *
|
2003-03-11 07:28:24 +08:00
|
|
|
* cvs up -r rpm-4_0 *
|
|
|
|
* *
|
|
|
|
****************************************************************************
|
|
|
|
"
|
|
|
|
sleep 10
|
2001-09-25 11:03:23 +08:00
|
|
|
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_PREREQ(2.59)
|
|
|
|
AC_INIT(rpm, 4.3, rpm-list@redhat.com)
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
AC_CONFIG_SRCDIR([rpmqv.c])
|
|
|
|
AM_CONFIG_HEADER([config.h])
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
|
2004-01-06 03:04:59 +08:00
|
|
|
dnl Set of available languages.
|
|
|
|
ALL_LINGUAS="cs da de fi fr gl is ja ko no pl pt pt_BR ro ru sk sl sr sv tr"
|
|
|
|
|
1996-12-12 11:32:40 +08:00
|
|
|
dnl Checks for programs.
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_AWK
|
1996-12-12 11:32:40 +08:00
|
|
|
AC_PROG_CC
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_YACC
|
|
|
|
|
2001-08-05 00:18:58 +08:00
|
|
|
AC_AIX
|
|
|
|
AC_MINIX
|
2001-08-01 02:13:22 +08:00
|
|
|
AS=${AS-as}
|
|
|
|
AC_SUBST(AS)
|
2004-01-05 22:09:47 +08:00
|
|
|
if test "$ac_cv_c_compiler_gnu" = yes; then
|
2004-01-22 22:28:08 +08:00
|
|
|
CFLAGS="$CFLAGS -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
|
1998-10-08 18:40:27 +08:00
|
|
|
fi
|
2001-05-08 08:03:14 +08:00
|
|
|
export CFLAGS
|
1998-10-08 18:40:27 +08:00
|
|
|
|
1996-12-12 11:32:40 +08:00
|
|
|
AC_PROG_GCC_TRADITIONAL
|
2002-11-20 02:40:21 +08:00
|
|
|
AC_SYS_LARGEFILE
|
2001-05-10 06:58:56 +08:00
|
|
|
|
2001-08-15 22:03:03 +08:00
|
|
|
dnl Does this platform require array notation to assign to a va_list?
|
|
|
|
dnl If cross-compiling, we assume va_list is "normal". If this breaks
|
|
|
|
dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
|
|
|
|
dnl also just to be sure.
|
|
|
|
AC_MSG_CHECKING(whether va_list assignments need array notation)
|
|
|
|
AC_CACHE_VAL(ac_cv_valistisarray,
|
2004-01-05 22:09:47 +08:00
|
|
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
|
2001-08-15 22:03:03 +08:00
|
|
|
#include <stdarg.h>
|
|
|
|
void foo(int i, ...) {
|
|
|
|
va_list ap1, ap2;
|
|
|
|
va_start(ap1, i);
|
|
|
|
ap2 = ap1;
|
|
|
|
if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
|
|
|
|
{ exit(1); }
|
|
|
|
va_end(ap1); va_end(ap2);
|
|
|
|
}
|
2004-01-05 22:09:47 +08:00
|
|
|
int main() { foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
|
2001-08-15 22:03:03 +08:00
|
|
|
|
|
|
|
if test "$ac_cv_valistisarray" = true ; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_VA_LIST_AS_ARRAY, 1,
|
|
|
|
[Define as 1 if your va_list type is an array])
|
2001-08-15 22:03:03 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2001-05-10 06:58:56 +08:00
|
|
|
RPMUSER=rpm
|
|
|
|
RPMUID=37
|
|
|
|
RPMGROUP=rpm
|
|
|
|
RPMGID=37
|
|
|
|
export RPMUSER RPMUID RPMGROUP RPMGID
|
|
|
|
AC_SUBST(RPMUSER)
|
|
|
|
AC_SUBST(RPMUID)
|
|
|
|
AC_SUBST(RPMGROUP)
|
|
|
|
AC_SUBST(RPMGID)
|
1996-12-12 11:32:40 +08:00
|
|
|
|
2000-10-29 01:16:25 +08:00
|
|
|
AC_PATH_PROG(CTAGS, ctags, /bin/true)
|
|
|
|
AC_PATH_PROG(CSCOPE, cscope, /bin/true)
|
|
|
|
|
1998-03-05 00:53:54 +08:00
|
|
|
dnl
|
1999-01-26 03:46:40 +08:00
|
|
|
dnl This now uses libtool. Put
|
|
|
|
dnl LDFLAGS_STATIC="-all"
|
|
|
|
dnl to attempt static executables using libtool. Otherwise
|
|
|
|
dnl LDFLAGS_STATIC=""
|
1998-03-05 00:53:54 +08:00
|
|
|
dnl
|
1999-01-26 03:46:40 +08:00
|
|
|
AC_MSG_CHECKING(flag used by libtool to link rpm)
|
1998-03-05 00:53:54 +08:00
|
|
|
if test X"$GCC" = Xyes ; then
|
|
|
|
case "$target" in
|
2001-02-28 05:30:27 +08:00
|
|
|
*-*-solaris*) LDFLAGS_STATIC="-static";;
|
|
|
|
*-*-hpux*) LDFLAGS_STATIC="-static";;
|
|
|
|
*-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread.
|
|
|
|
*-*-*) LDFLAGS_STATIC="-all-static";;
|
1998-03-05 00:53:54 +08:00
|
|
|
esac
|
|
|
|
elif test X"$CC" = Xcc ; then
|
|
|
|
case "$target" in
|
2001-02-28 05:30:27 +08:00
|
|
|
*-*-linux*) LDFLAGS_STATIC="-all-static";;
|
|
|
|
*-*-freebsd*) LDFLAGS_STATIC="-all-static";;
|
|
|
|
*-*-osf*) LDFLAGS_STATIC="";; # OSF5 has no shared pthreads libs
|
|
|
|
*-*-aix*) LDFLAGS_STATIC="-static";; # -Wl,-bnso doesn't seem to work...
|
|
|
|
*-*-hpux*) LDFLAGS_STATIC="-static";;
|
|
|
|
*-*-solaris*) LDFLAGS_STATIC="-static";;
|
|
|
|
*-*-irix*) LDFLAGS_STATIC="-static";; #should be -non_shared, but can't
|
1998-03-05 00:53:54 +08:00
|
|
|
# link because of crt1.o then.
|
2001-02-28 05:30:27 +08:00
|
|
|
*-*-ultrix*) LDFLAGS_STATIC="-all-static";; #ultrix doesn't have shared libs.
|
|
|
|
*-*-*) LDFLAGS_STATIC="-static"
|
1998-03-05 00:53:54 +08:00
|
|
|
AC_MSG_WARN([
|
|
|
|
|
|
|
|
Unable to guess what option to pass to $CC to generate a static
|
1998-05-02 03:33:51 +08:00
|
|
|
executable. You will need to set the LDFLAGS_STATIC macro in Makefile.inc to
|
1998-03-05 00:53:54 +08:00
|
|
|
the appropriate argument(s) if you want to build a static rpm executable.
|
|
|
|
|
|
|
|
])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
else
|
1998-05-02 03:33:51 +08:00
|
|
|
# just link it dynamically
|
|
|
|
LDFLAGS_STATIC=""
|
1998-03-05 00:53:54 +08:00
|
|
|
fi
|
2001-02-28 05:30:27 +08:00
|
|
|
LDFLAGS_STATIC="${LDFLAGS} ${LDFLAGS_STATIC}" # libtool format
|
1998-05-02 03:33:51 +08:00
|
|
|
AC_MSG_RESULT($LDFLAGS_STATIC)
|
1999-04-16 13:44:36 +08:00
|
|
|
AC_SUBST(LDFLAGS_STATIC)
|
1998-03-05 00:53:54 +08:00
|
|
|
|
2002-12-20 07:41:52 +08:00
|
|
|
dnl
|
2002-12-20 23:03:18 +08:00
|
|
|
dnl XXX Test for libpthread.a that is NPTL aware (static link only).
|
2002-12-20 07:41:52 +08:00
|
|
|
dnl
|
|
|
|
LDFLAGS_NPTL=
|
2003-01-14 04:58:21 +08:00
|
|
|
if test -f /usr/lib/nptl/libpthread.a ; then
|
|
|
|
LDFLAGS_NPTL="-L/usr/lib/nptl"
|
2002-12-20 23:03:18 +08:00
|
|
|
# INCPATH="$INCPATH -I/usr/include/nptl"
|
2003-01-14 04:58:21 +08:00
|
|
|
fi
|
2002-12-20 07:41:52 +08:00
|
|
|
AC_SUBST(LDFLAGS_NPTL)
|
|
|
|
|
1999-04-16 13:44:36 +08:00
|
|
|
dnl
|
|
|
|
dnl look for POSIX chmod attributes
|
|
|
|
dnl
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(POSIX chmod)
|
1997-01-17 01:23:44 +08:00
|
|
|
touch foo.chmodtest
|
|
|
|
chmod 744 foo.chmodtest
|
|
|
|
chmod +X foo.chmodtest 2>/dev/null
|
|
|
|
a=`ls -l foo.chmodtest | awk '{print $1}'`
|
|
|
|
rm -f foo.chmodtest
|
|
|
|
if test "$a" = "-rwxr-xr-x"; then
|
1997-01-21 06:34:47 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
2004-03-28 08:49:54 +08:00
|
|
|
FIXPERMS=a+rX,u+w,g-w,o-w
|
1997-01-17 01:23:44 +08:00
|
|
|
else
|
1997-01-21 06:34:47 +08:00
|
|
|
AC_MSG_RESULT(no (tell your OS vendor about GNU fileutils))
|
2004-03-28 08:49:54 +08:00
|
|
|
FIXPERMS=a+r,u+w,g-w,o-w
|
1997-01-17 01:23:44 +08:00
|
|
|
fi
|
1999-04-16 13:44:36 +08:00
|
|
|
AC_SUBST(FIXPERMS)
|
1997-01-17 01:23:44 +08:00
|
|
|
|
1998-03-05 00:53:54 +08:00
|
|
|
dnl
|
|
|
|
dnl see if we have a mkdir that supports `-p'.
|
|
|
|
dnl
|
|
|
|
AC_PATH_PROGS(MKDIR, mkdir, mkdir)
|
|
|
|
AC_MSG_CHECKING(if $MKDIR supports -p)
|
|
|
|
rm -rf conftest
|
|
|
|
$MKDIR -p conftest/a 2>/dev/null
|
|
|
|
if test $? = 0 ; then
|
|
|
|
rmdir conftest/a 2>/dev/null
|
|
|
|
if test $? = 0 ; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
MKDIR_P=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
rmdir conftest 2>/dev/null
|
|
|
|
if test $? = 0 ; then
|
|
|
|
MKDIR_P="$MKDIR -p"
|
|
|
|
else
|
|
|
|
MKDIR_P=0
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
MKDIR_P=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test X"$MKDIR_P" = X0 ; then
|
|
|
|
AC_MSG_RESULT(no)
|
1998-10-07 00:04:03 +08:00
|
|
|
MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
|
1998-03-05 00:53:54 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
|
|
|
dnl
|
|
|
|
dnl substitute this into config.h, so the C source picks it up.
|
|
|
|
dnl
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(MKDIR_P, "${MKDIR_P}",
|
|
|
|
[A full path to a program, possibly with arguments, that will create a
|
|
|
|
directory and all necessary parent directories, ala `mkdir -p'])
|
1999-04-16 13:44:36 +08:00
|
|
|
AC_SUBST(MKDIR_P)
|
1998-03-05 00:53:54 +08:00
|
|
|
|
1996-12-12 11:32:40 +08:00
|
|
|
AC_ISC_POSIX
|
|
|
|
|
1998-10-08 18:40:27 +08:00
|
|
|
dnl This test must precede tests of compiler characteristics like
|
|
|
|
dnl that for the inline keyword, since it may change the degree to
|
|
|
|
dnl which the compiler supports such features.
|
|
|
|
AM_C_PROTOTYPES
|
|
|
|
|
1999-07-16 06:26:15 +08:00
|
|
|
dnl AM_DISABLE_SHARED
|
1999-01-22 06:30:50 +08:00
|
|
|
AM_PROG_LIBTOOL
|
1996-12-12 11:32:40 +08:00
|
|
|
|
|
|
|
AC_CHECK_TOOL(AR, ar, :)
|
|
|
|
|
1999-04-16 13:44:36 +08:00
|
|
|
dnl
|
2002-05-17 00:55:21 +08:00
|
|
|
dnl use defaults if cross-compiling, otherwise use the default path.
|
1999-04-16 13:44:36 +08:00
|
|
|
dnl
|
2002-05-17 00:55:21 +08:00
|
|
|
if test "$cross_compiling" = "yes"; then
|
|
|
|
MYPATH=""
|
|
|
|
else
|
|
|
|
# MYPATH="/bin:/usr/bin:/usr/local/bin:$PATH:/sbin:/usr/sbin:/usr/local/sbin:/opt/gnu/bin"
|
|
|
|
MYPATH=$PATH
|
|
|
|
fi
|
1998-05-26 21:19:52 +08:00
|
|
|
|
1999-04-16 13:44:36 +08:00
|
|
|
dnl
|
|
|
|
dnl Find some common programs
|
|
|
|
dnl
|
2002-05-17 00:55:21 +08:00
|
|
|
AC_PATH_PROG(BZIP2BIN, bzip2, /usr/bin/bzip2, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CHGRP, chgrp, /bin/chgrp, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CHOWN, chown, /bin/chown, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CP, cp, /bin/cp, $MYPATH)
|
|
|
|
AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
|
|
|
|
AC_PATH_PROG(__FILE, file, /usr/bin/file, $MYPATH)
|
|
|
|
AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $MYPATH)
|
|
|
|
AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
|
|
|
|
AC_PATH_PROG(GZIPBIN, gzip, /bin/gzip, $MYPATH)
|
|
|
|
AC_PATH_PROG(UNZIPBIN, unzip, /usr/bin/unzip, $MYPATH)
|
|
|
|
|
|
|
|
AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
|
|
|
|
AC_MSG_CHECKING(checking whether id supports -u)
|
|
|
|
if ${__ID} -u 2>&1 > /dev/null ; then
|
2000-03-10 02:13:02 +08:00
|
|
|
__ID_U="%{__id} -u"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
2000-03-10 04:48:15 +08:00
|
|
|
dnl XXX Watchout for square brackets fed to m4.
|
|
|
|
__ID_U="%{__id} | %{__sed} 's/[[^=]]*=\\\\([[0-9]][[0-9]]*\\\\).*$/\\\\1/'"
|
2000-03-10 02:13:02 +08:00
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
2002-05-17 00:55:21 +08:00
|
|
|
AC_SUBST(__ID_U)
|
|
|
|
|
|
|
|
AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
|
|
|
|
AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
|
|
|
|
AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
|
|
|
|
AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
|
|
|
|
AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
|
|
|
|
AC_MSG_CHECKING(old version of patch)
|
1997-10-23 23:10:03 +08:00
|
|
|
PATCHVERSION=`patch --version 2>&1`
|
1997-10-22 08:20:06 +08:00
|
|
|
|
1997-10-23 23:10:03 +08:00
|
|
|
if test "$PATCHVERSION" = "Patch version 2.1"; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_OLDPATCH_21, 1,
|
|
|
|
[Define if the patch call you'll be using is 2.1 or older])
|
1997-10-22 08:20:06 +08:00
|
|
|
AC_MSG_RESULT(patch older then 2.2 found)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(patch later then 2.2 found)
|
|
|
|
fi
|
1999-04-16 13:44:36 +08:00
|
|
|
|
2002-05-17 00:55:21 +08:00
|
|
|
AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
|
|
|
|
AC_PATH_PROG(PGPBIN, pgp, /usr/bin/pgp, $MYPATH)
|
|
|
|
AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
|
|
|
|
AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
|
|
|
|
AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
|
|
|
|
AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
|
|
|
|
AC_PATH_PROG(__SSH, ssh, /usr/bin/ssh, $MYPATH)
|
|
|
|
AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
|
|
|
|
|
|
|
|
AC_PATH_PROG(__LD, ld, /usr/bin/ld, $MYPATH)
|
|
|
|
AC_PATH_PROG(__NM, nm, /usr/bin/nm, $MYPATH)
|
|
|
|
AC_PATH_PROG(__OBJCOPY, objcopy, /usr/bin/objcopy, $MYPATH)
|
|
|
|
AC_PATH_PROG(__OBJDUMP, objdump, /usr/bin/objdump, $MYPATH)
|
|
|
|
AC_PATH_PROG(__STRIP, strip, /usr/bin/strip, $MYPATH)
|
1996-12-12 11:32:40 +08:00
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
addlib() {
|
|
|
|
l=$1
|
|
|
|
shift
|
|
|
|
case "$target" in
|
1998-09-13 04:46:24 +08:00
|
|
|
*-*-solaris*) LIBS="$LIBS -L$l -R$l $*";;
|
1998-04-09 10:45:39 +08:00
|
|
|
*) LIBS="$LIBS -L$l $*";;
|
1998-04-09 10:41:13 +08:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2001-11-23 23:49:11 +08:00
|
|
|
WITH_ZLIB_SUBDIR=
|
|
|
|
WITH_ZLIB_INCLUDE=
|
|
|
|
WITH_ZLIB_LIB=
|
|
|
|
if test -d zlib ; then
|
|
|
|
WITH_ZLIB_SUBDIR=zlib
|
|
|
|
addlib \${top_builddir}/zlib
|
|
|
|
WITH_ZLIB_INCLUDE="-I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
|
|
|
|
INCPATH="$INCPATH -I\${top_srcdir}/${WITH_ZLIB_SUBDIR}"
|
2001-12-28 05:04:37 +08:00
|
|
|
WITH_ZLIB_LIB="\${top_builddir}/${WITH_ZLIB_SUBDIR}/libz.la"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])
|
2001-11-23 23:49:11 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_ZLIB_SUBDIR)
|
|
|
|
AC_SUBST(WITH_ZLIB_INCLUDE)
|
|
|
|
AC_SUBST(WITH_ZLIB_LIB)
|
|
|
|
|
1998-07-09 01:30:37 +08:00
|
|
|
localdone=
|
2001-08-01 02:13:22 +08:00
|
|
|
|
|
|
|
dirs=$prefix
|
|
|
|
if test "$cross_compiling" != "yes"; then
|
|
|
|
dirs="$dirs /usr/local"
|
|
|
|
fi
|
|
|
|
for dir in $dirs
|
1998-07-09 01:30:37 +08:00
|
|
|
do
|
|
|
|
case $dir in
|
|
|
|
NONE|/usr) continue;;
|
|
|
|
/usr/local)
|
|
|
|
if test X$localdone != X ; then continue; fi
|
|
|
|
localdone="$dir"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for $dir/lib in LIBS)
|
2002-02-21 06:09:28 +08:00
|
|
|
if test -d $dir/lib 2> /dev/null ; then
|
1998-07-09 01:30:37 +08:00
|
|
|
addlib $dir/lib
|
1997-06-26 22:35:37 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
1997-02-12 12:48:06 +08:00
|
|
|
else
|
1997-06-26 22:35:37 +08:00
|
|
|
AC_MSG_RESULT(no)
|
1997-02-12 12:48:06 +08:00
|
|
|
fi
|
|
|
|
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(for $dir/include in INCPATH)
|
2002-02-11 05:13:52 +08:00
|
|
|
if test -d $dir/include 2>/dev/null ; then
|
2002-02-11 03:00:16 +08:00
|
|
|
if [ "$dir" != "/usr/local" ] ; then
|
|
|
|
INCPATH="$INCPATH -I$dir/include"
|
|
|
|
fi
|
1997-06-26 22:35:37 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
1997-02-12 12:48:06 +08:00
|
|
|
else
|
1997-06-26 22:35:37 +08:00
|
|
|
AC_MSG_RESULT(no)
|
1997-02-12 12:48:06 +08:00
|
|
|
fi
|
1998-07-09 01:30:37 +08:00
|
|
|
done
|
1996-10-15 10:13:16 +08:00
|
|
|
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(for /usr/ucblib in LIBS)
|
1997-05-02 03:07:43 +08:00
|
|
|
if test -d /usr/ucblib ; then
|
1997-11-05 22:39:20 +08:00
|
|
|
if test "$build" = "mips-sni-sysv4" ; then
|
1998-04-09 10:41:13 +08:00
|
|
|
addlib /usr/ccs/lib -lc
|
1997-11-05 22:39:20 +08:00
|
|
|
fi
|
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
addlib /usr/ucblib
|
1997-05-01 02:03:27 +08:00
|
|
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
1999-07-09 06:10:33 +08:00
|
|
|
dnl
|
|
|
|
dnl Check for features
|
|
|
|
dnl
|
|
|
|
|
1996-12-12 11:32:40 +08:00
|
|
|
dnl Checks for libraries.
|
1996-09-26 03:10:44 +08:00
|
|
|
|
2002-11-30 05:35:53 +08:00
|
|
|
WITH_ELFUTILS_SUBDIR=
|
2002-06-20 10:19:21 +08:00
|
|
|
WITH_LIBELF_INCLUDE=
|
|
|
|
WITH_LIBELF_LIB=
|
2002-12-01 05:07:08 +08:00
|
|
|
AC_CHECK_HEADER([libelf.h])
|
|
|
|
AC_CHECK_HEADER([gelf.h], [
|
2002-12-01 05:42:24 +08:00
|
|
|
AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
|
2002-11-30 05:35:53 +08:00
|
|
|
AC_CHECK_LIB(elf, gelf_getvernaux, [
|
2002-12-01 05:42:24 +08:00
|
|
|
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
|
2002-12-02 02:03:22 +08:00
|
|
|
WITH_LIBELF_LIB="-lelf"
|
2002-11-30 05:35:53 +08:00
|
|
|
])
|
|
|
|
], [
|
2002-10-16 02:44:16 +08:00
|
|
|
if test -d elfutils/libelf ; then
|
2002-10-19 02:45:47 +08:00
|
|
|
AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have the <gelf.h> header file.])
|
2002-06-20 10:19:21 +08:00
|
|
|
AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the `elf' library (-lelf).])
|
2002-12-01 05:07:08 +08:00
|
|
|
WITH_ELFUTILS_SUBDIR=elfutils
|
2002-11-30 05:35:53 +08:00
|
|
|
WITH_LIBELF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libelf"
|
2002-12-01 05:07:08 +08:00
|
|
|
WITH_LIBELF_LIB="\${top_builddir}/${WITH_ELFUTILS_SUBDIR}/libelf/libelf.a"
|
2002-06-21 05:53:31 +08:00
|
|
|
fi
|
2002-11-30 05:35:53 +08:00
|
|
|
])
|
2002-12-01 05:07:08 +08:00
|
|
|
AC_SUBST(WITH_ELFUTILS_SUBDIR)
|
2002-06-20 10:19:21 +08:00
|
|
|
AC_SUBST(WITH_LIBELF_INCLUDE)
|
|
|
|
AC_SUBST(WITH_LIBELF_LIB)
|
|
|
|
|
2002-10-19 02:45:47 +08:00
|
|
|
WITH_LIBDWARF_INCLUDE=
|
2002-12-01 05:42:24 +08:00
|
|
|
AC_CHECK_HEADER([dwarf.h], [
|
2002-12-02 02:03:22 +08:00
|
|
|
AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
|
2002-12-01 05:42:24 +08:00
|
|
|
], [
|
2002-10-19 02:45:47 +08:00
|
|
|
if test -d elfutils/libdwarf ; then
|
|
|
|
AC_DEFINE(HAVE_DWARF_H, 1, [Define to 1 if you have the <dwarf.h> header file.])
|
2002-11-30 05:35:53 +08:00
|
|
|
WITH_LIBDWARF_INCLUDE="-I\${top_srcdir}/${WITH_ELFUTILS_SUBDIR}/libdwarf"
|
2002-10-19 02:45:47 +08:00
|
|
|
fi
|
2002-11-30 05:35:53 +08:00
|
|
|
])
|
2002-10-19 02:45:47 +08:00
|
|
|
AC_SUBST(WITH_LIBDWARF_INCLUDE)
|
|
|
|
|
2003-05-23 05:21:43 +08:00
|
|
|
WITH_BEECRYPT_SUBDIR=
|
|
|
|
WITH_BEECRYPT_INCLUDE=
|
|
|
|
WITH_BEECRYPT_LIB=
|
2003-05-31 00:58:13 +08:00
|
|
|
AC_CHECK_HEADER([beecrypt/beecrypt.h], [
|
|
|
|
AC_CHECK_LIB(beecrypt, mpfprintln, [
|
|
|
|
AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
|
|
|
|
WITH_BEECRYPT_INCLUDE="-I/usr/include/beecrypt"
|
|
|
|
WITH_BEECRYPT_LIB="-lbeecrypt"
|
|
|
|
])
|
|
|
|
], [
|
2003-05-23 05:21:43 +08:00
|
|
|
if test -d beecrypt ; then
|
|
|
|
AC_DEFINE(HAVE_LIBBEECRYPT, 1, [Define to 1 if you have the `beecrypt' library (-lbeecrypt).])
|
|
|
|
WITH_BEECRYPT_SUBDIR=beecrypt
|
|
|
|
WITH_BEECRYPT_INCLUDE="-I\${top_srcdir}/${WITH_BEECRYPT_SUBDIR}"
|
|
|
|
WITH_BEECRYPT_LIB="\${top_builddir}/${WITH_BEECRYPT_SUBDIR}/libbeecrypt.la"
|
|
|
|
fi
|
2003-05-31 00:58:13 +08:00
|
|
|
])
|
2003-05-23 05:21:43 +08:00
|
|
|
AC_SUBST(WITH_BEECRYPT_SUBDIR)
|
|
|
|
AC_SUBST(WITH_BEECRYPT_INCLUDE)
|
|
|
|
AC_SUBST(WITH_BEECRYPT_LIB)
|
|
|
|
|
1998-09-25 00:49:51 +08:00
|
|
|
AC_CHECK_FUNC(setreuid, [], [
|
1998-10-06 03:49:30 +08:00
|
|
|
AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
|
1998-09-25 00:49:51 +08:00
|
|
|
])
|
1997-05-01 02:03:27 +08:00
|
|
|
|
1997-11-01 01:31:17 +08:00
|
|
|
AC_CHECK_FUNC(rand, [], [
|
2002-04-15 05:48:44 +08:00
|
|
|
AC_CHECK_LIB(rand, rand, [])
|
1997-07-24 02:36:55 +08:00
|
|
|
])
|
|
|
|
|
1997-05-02 03:07:43 +08:00
|
|
|
AC_CHECK_FUNC(getdomainname, [], [
|
2002-04-15 05:48:44 +08:00
|
|
|
AC_CHECK_LIB(nsl, getdomainname)
|
1997-03-12 01:09:34 +08:00
|
|
|
])
|
|
|
|
AC_CHECK_FUNC(socket, [], [
|
2002-04-15 05:48:44 +08:00
|
|
|
AC_CHECK_LIB(socket, socket)
|
1997-03-12 01:09:34 +08:00
|
|
|
])
|
1997-03-04 10:22:20 +08:00
|
|
|
|
2003-04-17 06:13:18 +08:00
|
|
|
AC_CHECK_HEADERS(error.h)
|
|
|
|
AC_CHECK_FUNCS(error)
|
2002-04-15 05:48:44 +08:00
|
|
|
AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
|
|
|
|
dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
|
|
|
|
AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
|
|
|
|
AC_CHECK_LIB(thread, mutex_lock)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(aio.h)
|
|
|
|
AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
|
|
|
|
|
1999-06-18 05:35:34 +08:00
|
|
|
dnl Better not use fchmod at all.
|
|
|
|
AC_CHECK_FUNC(fchmod)
|
|
|
|
|
2001-04-18 03:29:12 +08:00
|
|
|
AC_CHECK_FUNCS(vsnprintf snprintf)
|
|
|
|
|
1999-06-18 05:35:34 +08:00
|
|
|
dnl Temporary hack for MiNT. Some functions (writev, snprintf) are
|
|
|
|
dnl not in the libc but in libport (for political reasons). This check
|
|
|
|
dnl can hopefully be removed soon. Please use the default action
|
|
|
|
dnl for this macro (not LIBS=...), otherwise the check for dbopen
|
|
|
|
dnl will fail.
|
|
|
|
AC_CHECK_LIB(port, writev)
|
|
|
|
|
2001-05-08 03:21:16 +08:00
|
|
|
dnl ------------------ with internal db
|
2003-12-12 03:09:58 +08:00
|
|
|
AC_DEFINE(HAVE_DB3_DB_H, 1, [Define if you have the <db3/db.h> header file])
|
|
|
|
WITH_DB_SUBDIR=db3
|
|
|
|
WITH_INTERNAL_DB=1
|
|
|
|
DBLIBSRCS="db3.c"
|
2001-05-08 03:21:16 +08:00
|
|
|
|
|
|
|
AC_SUBST(WITH_DB_SUBDIR)
|
|
|
|
AC_SUBST(WITH_INTERNAL_DB)
|
|
|
|
|
2002-05-04 03:06:03 +08:00
|
|
|
DBLIBSRCS="$DBLIBSRCS"
|
2000-12-03 05:53:44 +08:00
|
|
|
DBLIBOBJS=`echo $DBLIBSRCS | sed -e "s/\.c/\.lo/g"`
|
|
|
|
|
|
|
|
AC_SUBST(DBLIBSRCS)
|
2000-03-23 23:49:50 +08:00
|
|
|
AC_SUBST(DBLIBOBJS)
|
2000-04-09 05:36:02 +08:00
|
|
|
|
1996-12-12 11:32:40 +08:00
|
|
|
dnl AmigaOS and IXEmul have a fork() dummy
|
2002-05-02 06:13:00 +08:00
|
|
|
case "$target" in
|
|
|
|
m68k-*-amigaos )
|
|
|
|
echo "Building for AmigaOS: using vfork() instead of fork()";
|
|
|
|
CFLAGS="$CFLAGS -Dfork=vfork"
|
|
|
|
;;
|
|
|
|
esac
|
1996-12-12 11:32:40 +08:00
|
|
|
|
2001-11-23 23:49:11 +08:00
|
|
|
if test -z "${WITH_ZLIB_LIB}" ; then
|
1996-08-20 01:15:47 +08:00
|
|
|
for zlib in z gz ; do
|
|
|
|
AC_CHECK_LIB(${zlib}, gzread,
|
1997-08-21 09:07:29 +08:00
|
|
|
[LIBS="$LIBS -l${zlib}"; break],
|
1996-08-20 01:15:47 +08:00
|
|
|
[if test ${zlib} = gz; then
|
2000-03-10 02:13:02 +08:00
|
|
|
AC_MSG_ERROR([sorry rpm requires libz.a or libgz.a (from the zlib package)])
|
1996-08-20 01:15:47 +08:00
|
|
|
fi]
|
1997-03-12 01:09:34 +08:00
|
|
|
)
|
1996-08-20 01:15:47 +08:00
|
|
|
done
|
|
|
|
|
2000-03-07 23:37:17 +08:00
|
|
|
dnl zlib-1.0.4 has not gzseek
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
|
2001-11-23 23:49:11 +08:00
|
|
|
fi
|
2000-03-07 23:37:17 +08:00
|
|
|
|
2000-08-14 21:25:09 +08:00
|
|
|
AC_CHECK_LIB(bz2, bzread, [LIBS="$LIBS -lbz2"],
|
2000-05-17 04:22:59 +08:00
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzread, [
|
2000-12-04 08:55:17 +08:00
|
|
|
WITH_BZIP2=1
|
2000-05-17 04:22:59 +08:00
|
|
|
LIBS="$LIBS -lbz2"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0]) ],
|
2000-12-04 08:55:17 +08:00
|
|
|
WITH_BZIP2=0))
|
|
|
|
AC_SUBST(WITH_BZIP2)
|
1998-11-23 03:48:48 +08:00
|
|
|
|
1998-10-08 22:59:17 +08:00
|
|
|
AM_GNU_GETTEXT
|
1999-04-04 01:13:35 +08:00
|
|
|
dnl TVM:
|
|
|
|
dnl horrible *temporary* hack to make sure that if we found gettext() in
|
|
|
|
dnl -lintl that we add -lintl *back* to $LIBS.
|
|
|
|
dnl
|
|
|
|
if test X$gt_cv_func_gettext_libintl = Xyes ; then
|
|
|
|
LIBS="-lintl $LIBS"
|
|
|
|
fi
|
1998-10-08 22:59:17 +08:00
|
|
|
|
1996-09-29 10:27:07 +08:00
|
|
|
dnl Checks for header files we can live without.
|
1997-01-25 03:04:51 +08:00
|
|
|
AC_HEADER_STDC
|
1997-05-06 04:46:58 +08:00
|
|
|
AC_HEADER_MAJOR
|
1998-10-06 23:26:55 +08:00
|
|
|
AC_HEADER_DIRENT
|
1998-10-08 22:59:17 +08:00
|
|
|
AC_HEADER_TIME
|
1998-10-06 02:31:48 +08:00
|
|
|
|
1999-01-01 06:09:43 +08:00
|
|
|
AC_CHECK_HEADERS(fcntl.h getopt.h grp.h memory.h netdb.h pwd.h utime.h)
|
1997-01-17 03:44:24 +08:00
|
|
|
|
2001-05-10 06:58:56 +08:00
|
|
|
AC_CHECK_HEADERS(sys/ipc.h sys/socket.h sys/select.h)
|
1998-10-08 22:59:17 +08:00
|
|
|
AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
|
|
|
|
AC_CHECK_HEADERS(sys/mman.h sys/resource.h sys/utsname.h sys/wait.h)
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(netinet/in_systm.h)
|
|
|
|
AC_CHECK_HEADERS(machine/types.h)
|
|
|
|
AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
|
2000-03-16 22:27:04 +08:00
|
|
|
AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h)
|
1998-11-23 03:48:48 +08:00
|
|
|
AC_CHECK_HEADERS(bzlib.h libio.h zlib.h)
|
1999-09-21 11:22:53 +08:00
|
|
|
AC_CHECK_HEADERS(err.h mcheck.h)
|
2002-02-25 23:29:22 +08:00
|
|
|
AC_CHECK_HEADERS(pthread.h)
|
1996-09-26 03:10:44 +08:00
|
|
|
|
2000-12-31 03:59:37 +08:00
|
|
|
dnl popt w float/double needs.
|
|
|
|
AC_CHECK_HEADERS(float.h)
|
|
|
|
|
1999-04-17 07:05:00 +08:00
|
|
|
AC_CHECK_HEADERS(glob.h)
|
|
|
|
|
1999-04-09 04:09:48 +08:00
|
|
|
dnl statfs portability fiddles.
|
1999-04-14 19:28:31 +08:00
|
|
|
dnl
|
|
|
|
dnl We should really emulate/steal sections of the statfs and struct statfs
|
|
|
|
dnl checks from GNU fileutils.
|
|
|
|
dnl
|
1999-03-23 02:36:23 +08:00
|
|
|
AC_MSG_CHECKING(for struct statfs)
|
1999-04-09 04:09:48 +08:00
|
|
|
dnl
|
|
|
|
dnl this is easier than nesting AC_TRY_COMPILEs...
|
|
|
|
dnl
|
|
|
|
found_struct_statfs=no
|
|
|
|
|
1999-04-17 07:05:00 +08:00
|
|
|
if test X$found_struct_statfs = Xno ; then
|
|
|
|
dnl Solaris 2.6+ wants to use statvfs
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
1999-04-17 07:05:00 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2004-01-05 22:09:47 +08:00
|
|
|
#include <sys/statvfs.h> ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h)
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
|
|
|
|
[statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
|
2004-01-05 22:09:47 +08:00
|
|
|
found_struct_statfs=yes],[])
|
1999-04-17 07:05:00 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test X$found_struct_statfs = Xno ; then
|
1999-04-09 04:09:48 +08:00
|
|
|
dnl first try including sys/vfs.h
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
1999-04-09 04:09:48 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2004-01-05 22:09:47 +08:00
|
|
|
#include <sys/vfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h)
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
|
2004-01-05 22:09:47 +08:00
|
|
|
found_struct_statfs=yes],[])
|
1999-04-17 07:05:00 +08:00
|
|
|
fi
|
1999-04-09 04:09:48 +08:00
|
|
|
|
|
|
|
if test X$found_struct_statfs = Xno ; then
|
|
|
|
dnl ...next try including sys/mount.h
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
1999-04-09 04:09:48 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2000-03-16 22:27:04 +08:00
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
|
|
#include <sys/param.h>
|
|
|
|
#endif
|
2004-01-05 22:09:47 +08:00
|
|
|
#include <sys/mount.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/mount.h)
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(STATFS_IN_SYS_MOUNT, 1, [statfs in <sys/mount.h> (for Digital Unix 4.0D systems)])
|
2004-01-05 22:09:47 +08:00
|
|
|
found_struct_statfs=yes],[])
|
1999-04-09 04:09:48 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test X$found_struct_statfs = Xno ; then
|
|
|
|
dnl ...still no joy. Try sys/statfs.h
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
1999-04-09 04:09:48 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2004-01-05 22:09:47 +08:00
|
|
|
#include <sys/statfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/statfs.h)
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(STATFS_IN_SYS_STATFS, 1, [statfs in <sys/statfs.h> (for Irix 6.4 systems)])
|
2004-01-05 22:09:47 +08:00
|
|
|
found_struct_statfs=yes],[])
|
1999-04-09 04:09:48 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test X$found_struct_statfs = Xno ; then
|
|
|
|
dnl ...no luck. Warn the user of impending doom.
|
|
|
|
AC_MSG_WARN(not found)
|
|
|
|
fi
|
|
|
|
|
1999-04-14 19:28:31 +08:00
|
|
|
dnl
|
|
|
|
dnl if we found the struct, see if it has the f_bavail member. Some OSes
|
|
|
|
dnl don't, including IRIX 6.5+
|
|
|
|
dnl
|
|
|
|
if test X$found_struct_statfs = Xyes ; then
|
|
|
|
AC_MSG_CHECKING(for f_bavail member in struct statfs)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
1999-04-14 19:28:31 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
1999-04-17 07:05:00 +08:00
|
|
|
#if STATFS_IN_SYS_STATVFS
|
|
|
|
# include <sys/statvfs.h>
|
|
|
|
typedef struct statvfs STATFS_t;
|
|
|
|
#else
|
|
|
|
typedef struct statfs STATFS_t;
|
|
|
|
# if STATFS_IN_SYS_VFS
|
|
|
|
# include <sys/vfs.h>
|
|
|
|
# elif STATFS_IN_SYS_MOUNT
|
|
|
|
# include <sys/mouht.h>
|
|
|
|
# elif STATFS_IN_SYS_STATFS
|
|
|
|
# include <sys/statfs.h>
|
|
|
|
# endif
|
2004-01-05 22:09:47 +08:00
|
|
|
#endif ]], [[STATFS_t sfs;
|
|
|
|
sfs.f_bavail = 0;]])],[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(STATFS_HAS_F_BAVAIL, 1, [Define if struct statfs has the f_bavail member])],[AC_MSG_RESULT(no)
|
|
|
|
])
|
1999-04-14 19:28:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test X$found_struct_statfs = Xyes ; then
|
|
|
|
dnl
|
|
|
|
dnl now check to see if we have the 4-argument variant of statfs()
|
2004-01-05 22:09:47 +08:00
|
|
|
dnl this pretty much requires AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[])
|
1999-04-14 19:28:31 +08:00
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING([if statfs() requires 4 arguments])
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
1999-04-14 19:28:31 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef STATFS_IN_SYS_VFS
|
|
|
|
#include <sys/vfs.h>
|
|
|
|
#elif STATFS_IN_SYS_MOUNT
|
|
|
|
#include <sys/mouht.h>
|
|
|
|
#elif STATFS_IN_SYS_STATFS
|
|
|
|
#include <sys/statfs.h>
|
|
|
|
#endif
|
|
|
|
main() {
|
|
|
|
struct statfs sfs;
|
|
|
|
exit (statfs(".", &sfs, sizeof(sfs), 0));
|
|
|
|
}
|
2004-01-05 22:09:47 +08:00
|
|
|
]])],[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(STAT_STATFS4, 1, [Define if the statfs() call takes 4 arguments])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)
|
|
|
|
])
|
1999-04-14 19:28:31 +08:00
|
|
|
fi
|
1999-03-23 02:36:23 +08:00
|
|
|
|
1998-03-28 01:41:19 +08:00
|
|
|
AC_C_INLINE
|
1996-08-20 01:15:47 +08:00
|
|
|
|
1997-01-21 06:34:47 +08:00
|
|
|
dnl look for libc features
|
1997-01-24 04:29:16 +08:00
|
|
|
PROVIDES_ERRNO=no
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(if <netdb.h> defines h_errno)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
|
1997-01-24 04:29:16 +08:00
|
|
|
AC_MSG_RESULT($PROVIDES_ERRNO)
|
|
|
|
if test $PROVIDES_ERRNO = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
|
1997-01-21 06:34:47 +08:00
|
|
|
fi
|
|
|
|
|
1997-04-30 23:32:40 +08:00
|
|
|
dnl If a system doesn't have S_IFSOCK, define it as 0 which will
|
|
|
|
dnl make S_ISSOCK always return false (nice, eh?)
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
|
1997-04-30 23:32:40 +08:00
|
|
|
AC_MSG_RESULT($HAS_S_IFSOCK)
|
1997-05-02 03:07:43 +08:00
|
|
|
if test $HAS_S_IFSOCK = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
|
1997-04-30 23:32:40 +08:00
|
|
|
fi
|
|
|
|
|
1997-03-20 23:18:07 +08:00
|
|
|
dnl Some Unix's are missing S_ISLNK, S_ISSOCK
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
|
1997-03-20 23:18:07 +08:00
|
|
|
AC_MSG_RESULT($HAS_S_ISLNK)
|
1997-05-02 03:07:43 +08:00
|
|
|
if test $HAS_S_ISLNK = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
|
1997-03-20 23:18:07 +08:00
|
|
|
fi
|
|
|
|
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
|
1997-03-20 23:18:07 +08:00
|
|
|
AC_MSG_RESULT($HAS_S_ISSOCK)
|
1997-05-02 03:07:43 +08:00
|
|
|
if test $HAS_S_ISSOCK = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
|
1997-03-20 23:18:07 +08:00
|
|
|
fi
|
|
|
|
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(if timezone is defined)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
|
1998-04-09 10:41:13 +08:00
|
|
|
AC_MSG_RESULT($HAS_TIMEZONE)
|
1997-05-15 22:02:36 +08:00
|
|
|
|
1998-10-07 01:56:44 +08:00
|
|
|
dnl Check for missing typedefs
|
2003-11-24 03:50:52 +08:00
|
|
|
AC_TYPE_MODE_T
|
2003-04-17 06:13:18 +08:00
|
|
|
AC_TYPE_OFF_T
|
1998-10-07 01:56:44 +08:00
|
|
|
AC_TYPE_PID_T
|
2003-04-17 06:13:18 +08:00
|
|
|
AC_TYPE_SIZE_T
|
1998-10-07 01:56:44 +08:00
|
|
|
|
1996-08-20 01:15:47 +08:00
|
|
|
dnl Checks for library functions.
|
1998-10-08 18:40:27 +08:00
|
|
|
AC_FUNC_ALLOCA
|
1998-10-09 02:49:59 +08:00
|
|
|
AC_FUNC_VPRINTF
|
1998-10-08 18:40:27 +08:00
|
|
|
|
|
|
|
dnl XXX AC_FUNC_MEMCMP
|
|
|
|
dnl XXX AC_FUNC_MMAP
|
|
|
|
dnl XXX AC_TYPE_SIGNAL
|
|
|
|
dnl XXX AC_FUNC_STRCOLL
|
|
|
|
dnl XXX AC_FUNC_STRFTIME
|
|
|
|
dnl XXX AC_FUNC_UTIME_NULL
|
2004-01-05 22:09:47 +08:00
|
|
|
dnl XXX AC_FUNC_FORK([])
|
1999-09-08 06:46:19 +08:00
|
|
|
dnl XXX AC_CHECK_FUNCS(gethostname mkdir mkfifo rmdir select uname)
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-02-25 07:33:58 +08:00
|
|
|
AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath setenv)
|
2001-01-04 04:19:27 +08:00
|
|
|
AC_CHECK_FUNCS(stpcpy stpncpy strcspn)
|
1999-11-27 08:15:07 +08:00
|
|
|
AC_CHECK_FUNCS(strdup strerror strtol strtoul strspn strstr)
|
1999-09-12 08:41:51 +08:00
|
|
|
|
2003-05-01 04:04:58 +08:00
|
|
|
AC_CHECK_FUNCS(__secure_getenv)
|
|
|
|
|
2000-03-10 04:48:15 +08:00
|
|
|
AC_CHECK_FUNCS(regcomp)
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-05-10 06:58:56 +08:00
|
|
|
AC_CHECK_FUNCS(ftok)
|
|
|
|
|
2003-12-27 01:36:38 +08:00
|
|
|
AC_CHECK_FUNCS(mkstemp)
|
|
|
|
|
1999-09-27 06:50:47 +08:00
|
|
|
dnl
|
|
|
|
dnl XXX Regex replacement isn't known to be needed yet.
|
|
|
|
dnl
|
1999-11-27 08:15:07 +08:00
|
|
|
dnl AC_ARG_WITH(regex, [ --with-regex use the GNU regex library ],
|
|
|
|
dnl [rpm_cv_regex=yes],
|
|
|
|
dnl [AC_CHECK_FUNCS(regcomp, rpm_cv_regex=no, rpm_cv_regex=yes)])
|
|
|
|
dnl
|
|
|
|
dnl if test $rpm_cv_regex = no ; then
|
|
|
|
dnl AC_MSG_CHECKING(whether the regexp library is broken)
|
2004-01-05 22:09:47 +08:00
|
|
|
dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
1999-11-27 08:15:07 +08:00
|
|
|
dnl #include <unistd.h>
|
|
|
|
dnl #include <regex.h>
|
2004-01-05 22:09:47 +08:00
|
|
|
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])
|
1999-11-27 08:15:07 +08:00
|
|
|
dnl AC_MSG_RESULT([$rpm_cv_regex_broken])
|
|
|
|
dnl if test $rpm_cv_regex_broken = yes ; then
|
2004-01-05 22:09:47 +08:00
|
|
|
dnl echo " --> using the included GNU regex instead." >&AS_MESSAGE_FD([])
|
1999-11-27 08:15:07 +08:00
|
|
|
dnl rpm_cv_regex=yes
|
|
|
|
dnl fi
|
|
|
|
dnl fi
|
|
|
|
dnl
|
|
|
|
dnl if test $rpm_cv_regex = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
dnl AC_DEFINE(USE_GNU_REGEX, 1)
|
|
|
|
dnl AC_LIBOBJ(regex)
|
1999-11-27 08:15:07 +08:00
|
|
|
dnl fi
|
1999-09-27 06:50:47 +08:00
|
|
|
|
|
|
|
dnl
|
2000-03-12 04:14:07 +08:00
|
|
|
dnl XXX Glob *is* broken on linux with libc5, solaris and possibly aix when
|
|
|
|
dnl %files gets something like
|
|
|
|
dnl /usr/*/locale/*/LC_MESSAGES/*.mo
|
|
|
|
dnl (Note: more than one asterisk in glob pattern.)
|
1999-09-27 06:50:47 +08:00
|
|
|
dnl
|
2000-03-10 02:13:02 +08:00
|
|
|
AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
|
|
|
|
[rpm_cv_glob=yes],
|
|
|
|
[AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)])
|
|
|
|
|
|
|
|
if test $rpm_cv_glob = no ; then
|
2001-08-05 00:18:58 +08:00
|
|
|
AC_CACHE_CHECK([for GNU extensions to glob], rpm_cv_glob_ext, [
|
2001-06-04 21:55:58 +08:00
|
|
|
rm -f t
|
2000-06-17 12:36:15 +08:00
|
|
|
mkdir t
|
|
|
|
mkdir t/p
|
|
|
|
touch t/p/foo.8
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2000-03-10 02:13:02 +08:00
|
|
|
#include <unistd.h>
|
2000-03-12 04:14:07 +08:00
|
|
|
#include <sys/stat.h>
|
2000-03-10 02:13:02 +08:00
|
|
|
#include <glob.h>
|
2000-03-12 04:35:03 +08:00
|
|
|
main() {
|
|
|
|
glob_t gl ;
|
|
|
|
gl.gl_stat = stat;
|
2000-06-17 12:36:15 +08:00
|
|
|
exit(glob("t/*/*.8", GLOB_PERIOD, NULL, &gl) || gl.gl_pathc < 1);
|
2004-01-05 22:09:47 +08:00
|
|
|
} ]])],[rpm_cv_glob_ext=yes],[rpm_cv_glob_ext=no],[rpm_cv_glob_ext=no])
|
2000-06-17 12:36:15 +08:00
|
|
|
rm -r t
|
2001-08-05 00:18:58 +08:00
|
|
|
])
|
|
|
|
if test "$rpm_cv_glob_ext" = no ; then
|
2004-01-05 22:09:47 +08:00
|
|
|
echo " --> using the included GNU glob instead." >&AS_MESSAGE_FD([])
|
2001-08-01 02:13:22 +08:00
|
|
|
rpm_cv_glob=yes
|
2000-03-10 02:13:02 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2001-08-05 00:18:58 +08:00
|
|
|
if test "$rpm_cv_glob" = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
|
|
|
|
AC_LIBOBJ(glob)
|
|
|
|
AC_LIBOBJ(fnmatch)
|
2000-03-10 02:13:02 +08:00
|
|
|
fi
|
2000-12-04 08:55:17 +08:00
|
|
|
dnl
|
2002-01-08 04:01:00 +08:00
|
|
|
dnl Auto-detect which python bindings should be built.
|
2000-12-04 08:55:17 +08:00
|
|
|
dnl
|
2000-12-13 04:03:45 +08:00
|
|
|
withval=auto
|
|
|
|
AC_ARG_WITH(python, [ --with-python build rpm python bindings ])
|
2000-12-04 08:55:17 +08:00
|
|
|
|
2002-05-26 01:15:20 +08:00
|
|
|
WITH_PYTHON_VERSION=$withval
|
2000-12-13 04:03:45 +08:00
|
|
|
if test $withval = auto ; then
|
2002-01-08 04:01:00 +08:00
|
|
|
|
2003-11-24 03:50:52 +08:00
|
|
|
AC_MSG_CHECKING(for python 2.3)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2003-11-24 03:50:52 +08:00
|
|
|
#include <python2.3/Python.h>
|
2000-12-04 08:55:17 +08:00
|
|
|
main() {
|
2003-11-24 03:50:52 +08:00
|
|
|
exit(strncmp("2.3", PY_VERSION, 3));
|
2004-01-05 22:09:47 +08:00
|
|
|
} ]])],[withval=yes],[withval=no],[withval=yes])
|
2001-01-09 01:20:32 +08:00
|
|
|
AC_MSG_RESULT($withval)
|
2002-01-08 04:01:00 +08:00
|
|
|
if test $withval = yes ; then
|
2003-11-24 03:50:52 +08:00
|
|
|
WITH_PYTHON_VERSION="2.3"
|
2002-01-08 04:01:00 +08:00
|
|
|
else
|
2003-11-24 03:50:52 +08:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for python 2.2)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2003-11-24 03:50:52 +08:00
|
|
|
#include <python2.2/Python.h>
|
|
|
|
main() {
|
|
|
|
exit(strncmp("2.2", PY_VERSION, 3));
|
2004-01-05 22:09:47 +08:00
|
|
|
} ]])],[withval=yes],[withval=no],[withval=yes])
|
2002-01-08 04:01:00 +08:00
|
|
|
AC_MSG_RESULT($withval)
|
|
|
|
if test $withval = yes ; then
|
2003-11-24 03:50:52 +08:00
|
|
|
WITH_PYTHON_VERSION="2.2"
|
|
|
|
else
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for python 1.5.2)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2003-11-24 03:50:52 +08:00
|
|
|
#include <python1.5/Python.h>
|
|
|
|
main() {
|
|
|
|
exit(strcmp("1.5.2", PY_VERSION));
|
2004-01-05 22:09:47 +08:00
|
|
|
} ]])],[withval=yes],[withval=no],[withval=yes])
|
2003-11-24 03:50:52 +08:00
|
|
|
AC_MSG_RESULT($withval)
|
|
|
|
if test $withval = yes ; then
|
|
|
|
WITH_PYTHON_VERSION="1.5"
|
|
|
|
fi
|
2002-01-08 04:01:00 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
fi
|
|
|
|
|
2002-05-26 01:15:20 +08:00
|
|
|
if test "$WITH_PYTHON_VERSION" != no ; then
|
2000-12-04 08:55:17 +08:00
|
|
|
WITH_PYTHON_SUBDIR=python
|
|
|
|
WITH_PYTHON_SUBPACKAGE=1
|
|
|
|
else
|
|
|
|
WITH_PYTHON_SUBDIR=
|
|
|
|
WITH_PYTHON_SUBPACKAGE=0
|
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_PYTHON_SUBDIR)
|
|
|
|
AC_SUBST(WITH_PYTHON_SUBPACKAGE)
|
2002-01-08 04:01:00 +08:00
|
|
|
AC_SUBST(WITH_PYTHON_VERSION)
|
2000-12-04 08:55:17 +08:00
|
|
|
|
|
|
|
AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
|
|
|
|
dnl
|
|
|
|
dnl Auto-detect whether doxygen generated API docs should be included.
|
|
|
|
dnl
|
2000-12-13 04:03:45 +08:00
|
|
|
withval=auto
|
|
|
|
AC_ARG_WITH(apidocs, [ --with-apidocs build rpm API docs ])
|
2000-12-04 08:55:17 +08:00
|
|
|
|
2000-12-13 04:03:45 +08:00
|
|
|
if test $withval = auto -a $__DOXYGEN != no ; then
|
|
|
|
withval=yes
|
|
|
|
elif test $withval = yes -a $__DOXYGEN = no ; then
|
|
|
|
AC_MSG_ERROR(--> rpm API docs needs doxygen in PATH)
|
|
|
|
fi
|
|
|
|
|
2004-01-05 22:09:47 +08:00
|
|
|
WITH_SELINUX_LIB=
|
|
|
|
withval=yes
|
|
|
|
AC_ARG_WITH(selinux, [ --with-selinux build with selinux support ])
|
|
|
|
if test $withval != no ; then
|
2004-01-06 01:15:18 +08:00
|
|
|
AC_DEFINE(WITH_SELINUX, 1, [Build with selinux support?])
|
2004-01-05 22:09:47 +08:00
|
|
|
WITH_SELINUX_LIB="-lselinux"
|
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_SELINUX_LIB)
|
|
|
|
|
2000-12-13 04:03:45 +08:00
|
|
|
if test $withval = yes; then
|
2000-12-04 08:55:17 +08:00
|
|
|
WITH_APIDOCS_TARGET=apidocs
|
|
|
|
WITH_APIDOCS=1
|
|
|
|
else
|
|
|
|
WITH_APIDOCS=0
|
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_APIDOCS_TARGET)
|
|
|
|
AC_SUBST(WITH_APIDOCS)
|
|
|
|
|
2000-12-13 04:03:45 +08:00
|
|
|
withval=no
|
|
|
|
AC_ARG_WITH(dmalloc, [ --with-dmalloc build with dmalloc debugging support ])
|
|
|
|
if test $withval = yes ; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
|
2000-12-13 04:03:45 +08:00
|
|
|
LIBS="$LIBS -ldmalloc"
|
|
|
|
fi
|
|
|
|
|
2002-08-20 06:27:44 +08:00
|
|
|
withval=no
|
|
|
|
AC_ARG_WITH(efence, [ --with-efence build with efence debugging support ])
|
|
|
|
if test $withval = yes ; then
|
|
|
|
AC_DEFINE(EFENCE, 1, [Build with libefence support?])
|
|
|
|
LIBS="$LIBS -lefence"
|
|
|
|
fi
|
|
|
|
|
1998-10-08 22:59:17 +08:00
|
|
|
AC_CHECK_FUNCS(setlocale)
|
|
|
|
|
1999-09-08 06:46:19 +08:00
|
|
|
dnl XXX Solaris <= 2.6 only permits 8 chars in password.
|
|
|
|
AC_CHECK_FUNCS(getpassphrase)
|
|
|
|
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
|
|
|
|
AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
|
|
|
|
AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [
|
1997-08-21 09:07:29 +08:00
|
|
|
AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r";
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [
|
2001-02-28 05:30:27 +08:00
|
|
|
AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used])
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_LIBOBJ(getmntent)])])])])
|
1997-05-20 23:28:25 +08:00
|
|
|
|
2000-03-10 02:13:02 +08:00
|
|
|
AC_CHECK_FUNC(lchown,
|
|
|
|
[__CHOWN_RHF="%{__chown} -Rhf"
|
|
|
|
__CHGRP_RHF="%{__chgrp} -Rhf"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(HAVE_LCHOWN, 1, [Define as 1 if you have lchown()])],
|
2000-03-10 02:13:02 +08:00
|
|
|
[__CHOWN_RHF="%{__chown} -Rf"
|
|
|
|
__CHGRP_RHF="%{__chgrp} -Rf"
|
1997-05-20 23:28:25 +08:00
|
|
|
dnl Does chown() follow symlinks? This should be a good enough test.
|
1998-07-09 01:30:37 +08:00
|
|
|
AC_MSG_CHECKING(whether chown() follows symlinks)
|
1997-05-20 23:28:25 +08:00
|
|
|
AC_ARG_ENABLE([broken-chown],
|
1999-01-23 02:42:31 +08:00
|
|
|
[ --enable-broken-chown this system's chown follows symbolic links],
|
1998-04-09 10:41:13 +08:00
|
|
|
result=$enableval, result=unknown)
|
1997-11-01 03:24:48 +08:00
|
|
|
if echo "$build" | egrep "(aix)|(hpux)|(linux)" > /dev/null ; then
|
1997-05-22 03:39:54 +08:00
|
|
|
result=yes
|
1997-08-27 02:22:16 +08:00
|
|
|
elif echo "$build" | egrep "(nextstep)" > /dev/null ; then
|
|
|
|
result=no
|
1997-05-22 03:39:54 +08:00
|
|
|
fi
|
|
|
|
if test $result = unknown; then
|
2000-03-10 02:13:02 +08:00
|
|
|
if test `${__ID} | cut -f2 -d\= | cut -f1 -d\(` = 0; then
|
1997-05-20 23:28:25 +08:00
|
|
|
rm -f foo bar
|
|
|
|
touch foo
|
|
|
|
ln -s foo bar
|
2000-03-10 02:13:02 +08:00
|
|
|
${__CHOWN} 10 bar
|
1997-05-20 23:28:25 +08:00
|
|
|
if test `ls -l foo | awk '{print $3}'` != "root"; then
|
|
|
|
result=yes
|
|
|
|
else
|
|
|
|
result=no
|
|
|
|
fi
|
2000-03-10 02:13:02 +08:00
|
|
|
${__RM} -f foo bar
|
1997-05-20 23:28:25 +08:00
|
|
|
else
|
|
|
|
AC_MSG_CHECKING((cannot check by non-root user))
|
|
|
|
result=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT($result)
|
|
|
|
if test $result = yes; then
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(CHOWN_FOLLOWS_SYMLINK, 1, [Define as 1 if chown() follows symlinks and you don't have lchown()])
|
2000-03-10 02:13:02 +08:00
|
|
|
fi])
|
|
|
|
AC_SUBST(__CHOWN_RHF)
|
|
|
|
AC_SUBST(__CHGRP_RHF)
|
1998-03-05 00:53:54 +08:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl figure out what root's primary group is
|
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING(root's primary group)
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
|
1998-03-05 00:53:54 +08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <grp.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
struct passwd *root = NULL;
|
|
|
|
struct group *roots_group = NULL;
|
|
|
|
FILE * tempfile = NULL;
|
|
|
|
|
|
|
|
root = getpwuid( (uid_t) 0 );
|
|
|
|
if (root != NULL) {
|
|
|
|
roots_group = getgrgid(root->pw_gid);
|
|
|
|
if (roots_group != NULL) {
|
|
|
|
tempfile = fopen("conftest_rootg", "w");
|
|
|
|
if (tempfile != NULL) {
|
|
|
|
fprintf(tempfile, "%s\n", roots_group->gr_name);
|
|
|
|
fclose(tempfile);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
exit(1);
|
2004-01-05 22:09:47 +08:00
|
|
|
}]])],[ROOT_GROUP=`cat conftest_rootg`],[ROOT_GROUP="root"],[ROOT_GROUP="root"
|
|
|
|
])
|
1998-03-05 00:53:54 +08:00
|
|
|
AC_MSG_RESULT($ROOT_GROUP)
|
|
|
|
AC_SUBST(ROOT_GROUP)
|
|
|
|
|
1996-08-21 00:24:37 +08:00
|
|
|
if test "x$varprefix" = "x"; then
|
2001-02-28 05:30:27 +08:00
|
|
|
# For /usr and /usr/local, we want the 'var' directory to go
|
|
|
|
# in /var and /var/local respectively. For everything else,
|
|
|
|
# just put the 'var' directory in prefix/var.
|
|
|
|
case $prefix in
|
|
|
|
/usr | /usr/local )
|
|
|
|
varprefix=`echo $prefix | sed 's/usr/var/'` ;;
|
|
|
|
NONE)
|
|
|
|
varprefix=`echo $ac_default_prefix | sed 's/usr/var/'` ;;
|
|
|
|
*)
|
|
|
|
varprefix=$prefix/var ;;
|
|
|
|
esac
|
1996-08-21 00:24:37 +08:00
|
|
|
fi
|
1999-04-16 13:44:36 +08:00
|
|
|
AC_SUBST(varprefix)
|
1996-08-21 00:24:37 +08:00
|
|
|
|
|
|
|
if test "x$tmpdir" = "x"; then
|
|
|
|
if test -d $varprefix/tmp; then
|
|
|
|
tmpdir=$varprefix/tmp
|
|
|
|
else
|
|
|
|
if test -d /var/tmp; then
|
|
|
|
tmpdir=/var/tmp
|
|
|
|
else
|
|
|
|
tmpdir=/tmp
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
1999-04-16 13:44:36 +08:00
|
|
|
AC_SUBST(tmpdir)
|
1996-08-21 00:24:37 +08:00
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
if echo "$build_os" | grep sco > /dev/null; then
|
1997-05-15 02:42:47 +08:00
|
|
|
echo "hacking things up for sco"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
|
|
|
|
AC_DEFINE(HAVE_STRUCT_MNTTAB, 1,
|
|
|
|
[Define as 1 if you have "struct mnttab" (only sco?)])
|
1997-05-15 02:42:47 +08:00
|
|
|
elif echo "$build_os" | grep sunos > /dev/null; then
|
|
|
|
echo "hacking things up for sunos"
|
|
|
|
CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
|
|
|
|
AC_DEFINE(NEED_MYREALLOC, 1, [Define as 1 if we need myrealloc])
|
|
|
|
AC_LIBOBJ(myrealloc)
|
1996-09-29 10:27:07 +08:00
|
|
|
fi
|
|
|
|
|
1998-04-04 00:33:19 +08:00
|
|
|
#
|
|
|
|
# get rid of the 4-th tuple, if config.guess returned "linux-gnu" for build_os
|
|
|
|
#
|
1999-04-21 03:17:23 +08:00
|
|
|
if echo "$build_os" | grep '.*-gnulibc1' > /dev/null ; then
|
|
|
|
build_os=`echo "${build_os}" | sed 's/-gnulibc1$//'`
|
|
|
|
fi
|
1998-04-04 00:33:19 +08:00
|
|
|
if echo "$build_os" | grep '.*-gnu' > /dev/null ; then
|
|
|
|
build_os=`echo "${build_os}" | sed 's/-gnu$//'`
|
|
|
|
fi
|
|
|
|
|
1998-04-09 10:41:13 +08:00
|
|
|
changequote(<, >)
|
1998-04-04 00:33:19 +08:00
|
|
|
build_os_exact="${build_os}"
|
|
|
|
build_os_major=`echo "${build_os}" | sed 's/\..*$//'`
|
|
|
|
build_os_noversion=`echo "${build_os}" | sed 's/[0-9]*\..*$//'`
|
1998-04-09 10:41:13 +08:00
|
|
|
changequote([, ])
|
1998-04-04 00:33:19 +08:00
|
|
|
|
1999-01-27 02:08:14 +08:00
|
|
|
rm -f ./find-provides
|
1998-12-18 00:45:22 +08:00
|
|
|
if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov for automatic provides generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ./find-provides
|
1998-12-18 00:45:22 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_exact}.prov ; then
|
1998-04-04 00:33:19 +08:00
|
|
|
echo "using ${srcdir}/autodeps/${build_os_exact}.prov for automatic provides generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_exact}.prov ./find-provides
|
1998-04-04 00:33:19 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_major}.prov ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_os_major}.prov for automatic provides generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_major}.prov ./find-provides
|
1998-04-04 00:33:19 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_noversion}.prov ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_os_noversion}.prov for automatic provides generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_noversion}.prov ./find-provides
|
1996-11-16 05:04:09 +08:00
|
|
|
else
|
1998-04-04 00:33:19 +08:00
|
|
|
echo "*** no default provides information is available for ${build_os_noversion}"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/none ./find-provides
|
1996-11-22 06:00:02 +08:00
|
|
|
fi
|
|
|
|
|
1999-01-27 02:08:14 +08:00
|
|
|
rm -f ./find-requires
|
1998-12-18 00:45:22 +08:00
|
|
|
if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req for automatic requires generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ./find-requires
|
1998-12-18 00:45:22 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_exact}.req ; then
|
1998-04-04 00:33:19 +08:00
|
|
|
echo "using ${srcdir}/autodeps/${build_os_exact}.req for automatic requires generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_exact}.req ./find-requires
|
1998-04-04 00:33:19 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_major}.req ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_os_major}.req for automatic requires generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_major}.req ./find-requires
|
1998-04-04 00:33:19 +08:00
|
|
|
elif test -f ${srcdir}/autodeps/${build_os_noversion}.req ; then
|
|
|
|
echo "using ${srcdir}/autodeps/${build_os_noversion}.req for automatic requires generation"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/${build_os_noversion}.req ./find-requires
|
1996-11-22 06:00:02 +08:00
|
|
|
else
|
1998-04-04 00:33:19 +08:00
|
|
|
echo "*** no default requires information is available for ${build_os_noversion}"
|
1999-01-27 02:08:14 +08:00
|
|
|
ln -s ${srcdir}/autodeps/none ./find-requires
|
1996-11-16 05:04:09 +08:00
|
|
|
fi
|
|
|
|
|
2002-12-02 05:34:06 +08:00
|
|
|
dnl XXX Choose /usr/lib or /usr/lib64 for library installs.
|
|
|
|
MARK64=
|
|
|
|
case "${target_cpu}" in
|
2002-12-06 10:09:57 +08:00
|
|
|
x86_64*|ppc64*|powerpc64*|sparc64*|s390x*) MARK64=64 ;;
|
2002-12-02 02:03:22 +08:00
|
|
|
esac
|
2002-12-02 05:34:06 +08:00
|
|
|
AC_SUBST(MARK64)
|
2002-12-02 02:03:22 +08:00
|
|
|
|
1999-03-14 06:37:47 +08:00
|
|
|
dnl Determine the canonical arch-vendor-os for the build machine
|
2003-07-03 03:26:04 +08:00
|
|
|
autorelocate_path='%{nil}'
|
1999-03-14 06:37:47 +08:00
|
|
|
case "${build_cpu}" in
|
2003-01-02 04:33:21 +08:00
|
|
|
*86) RPMCANONCOLOR=0; RPMCANONARCH=i386 ;;
|
2004-03-11 07:01:46 +08:00
|
|
|
ia32e*) RPMCANONCOLOR=3; RPMCANONARCH=ia32e ;;
|
|
|
|
amd64*) RPMCANONCOLOR=3; RPMCANONARCH=amd64 ;;
|
2003-01-02 04:33:21 +08:00
|
|
|
x86_64*) RPMCANONCOLOR=3; RPMCANONARCH=x86_64 ;;
|
|
|
|
alpha*) RPMCANONCOLOR=0; RPMCANONARCH=alpha ;;
|
2004-03-11 07:01:46 +08:00
|
|
|
sparc64*) RPMCANONCOLOR=0; RPMCANONARCH=sparc64 ;;
|
2003-01-02 04:33:21 +08:00
|
|
|
sparc*) RPMCANONCOLOR=0; RPMCANONARCH=sparc ;;
|
2003-07-03 03:26:04 +08:00
|
|
|
ia64*) RPMCANONCOLOR=2; RPMCANONARCH=ia64;
|
|
|
|
autorelocate_path='/emul/%%{ARCH}-%%{OS}' ;;
|
2003-02-15 07:03:35 +08:00
|
|
|
s390x*) RPMCANONCOLOR=3; RPMCANONARCH=s390x ;;
|
2003-01-02 04:33:21 +08:00
|
|
|
s390*) RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
|
2003-02-15 07:03:35 +08:00
|
|
|
powerpc64*|ppc64*) RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
|
2003-01-02 04:33:21 +08:00
|
|
|
powerpc*|ppc*) RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
|
|
|
|
armv3l*) RPMCANONCOLOR=0; RPMCANONARCH=armv3l ;;
|
|
|
|
armv4l*) RPMCANONCOLOR=0; RPMCANONARCH=armv4l ;;
|
|
|
|
armv4b*) RPMCANONCOLOR=0; RPMCANONARCH=armv4b ;;
|
|
|
|
arm*) RPMCANONCOLOR=0; RPMCANONARCH="${build_cpu}" ;;
|
|
|
|
mipsel*) RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
|
|
|
|
mips*) RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
|
|
|
|
m68k*) RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
|
|
|
|
*) RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
|
1999-03-14 06:37:47 +08:00
|
|
|
esac
|
1999-06-18 05:35:34 +08:00
|
|
|
case "${build_os_noversion}" in
|
|
|
|
mint) RPMCANONARCH=m68kmint ;;
|
|
|
|
esac
|
1999-03-14 06:37:47 +08:00
|
|
|
RPMCANONVENDOR="$build_vendor"
|
|
|
|
case "${build_vendor}" in
|
2002-07-25 08:13:25 +08:00
|
|
|
unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog)
|
2001-01-11 04:42:32 +08:00
|
|
|
test -f /etc/redhat-release && RPMCANONVENDOR=redhat
|
|
|
|
test -f /etc/pld-release && RPMCANONVENDOR=pld
|
|
|
|
test -f /etc/mandrake-release && RPMCANONVENDOR=mandrake
|
|
|
|
test -f /etc/conectiva-release && RPMCANONVENDOR=conectiva
|
2002-02-25 01:14:33 +08:00
|
|
|
test -f /etc/lvr-release && RPMCANONVENDOR=lvr
|
2002-07-25 08:13:25 +08:00
|
|
|
test -f /etc/yellowdog-release && RPMCANONVENDOR=yellowdog
|
2000-02-14 03:24:19 +08:00
|
|
|
;;
|
1999-03-14 06:37:47 +08:00
|
|
|
esac
|
|
|
|
RPMCANONOS="$build_os_noversion"
|
2003-01-02 04:33:21 +08:00
|
|
|
AC_SUBST(RPMCANONCOLOR)
|
2003-07-03 03:26:04 +08:00
|
|
|
AC_SUBST(autorelocate_path)
|
1999-03-14 06:37:47 +08:00
|
|
|
AC_SUBST(RPMCANONARCH)
|
|
|
|
AC_SUBST(RPMCANONVENDOR)
|
|
|
|
AC_SUBST(RPMCANONOS)
|
|
|
|
|
1999-08-26 04:00:26 +08:00
|
|
|
if test X"$prefix" = XNONE ; then
|
|
|
|
usrprefix="$ac_default_prefix"
|
|
|
|
else
|
|
|
|
usrprefix=$prefix
|
|
|
|
fi
|
|
|
|
LOCALEDIR="`echo ${usrprefix}/share/locale`"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR",
|
|
|
|
[Full path to rpm locale directory (usually /usr/share/locale)])
|
1998-11-23 03:48:48 +08:00
|
|
|
AC_SUBST(LOCALEDIR)
|
Hi!
I'd like to start building sparc64 packages (eventhough the install rule
details are yet to be designed - IMHO if 64bit SPARC userland is going into
7.0 we should rebuild all packages into 64bit in the next months or so to
have time to chase bugs etc.), and this is about what I need.
Basically I'd like to have %{_lib} to stand for the last part (normally
"lib") of dirname for directories like /lib, /usr/lib, /usr/X11R6/lib
because on sparc64-linux they are /lib64, /usr/lib64, /usr/X11R6/lib64 (and
on Solaris /lib/sparcv9, /usr/lib/sparcv9 etc.), so that one can use things
like
/usr/%{_lib} in the spec files.
Another thing which I need is an arch specific build root policy.
This patch does a few things:
1) add installplatform into EXTRA_DIST files, so that it is actually invoked
during rpm build not from CVS
2) Define %_lib lib and let target specific macros override it
3) Split __spec_install_post into __arch_install_post and __os_install_post,
--buildpolicy now specifies the __os_install_post part only. spec files
can still override the __arch_install_post if the want to.
brp-sparc64-linux is used to move 64bit libraries to */lib64 directories
from */lib directories if make install of some package left them there.
4) Change installplatform so that on sparc* it creates both sparc and
sparc64 target macro dirs (/usr/lib/rpm/sparc{,64}-redhat-linux in
sparc*-redhat-linux case).
CVS patchset: 3685
CVS date: 2000/04/19 16:03:49
2000-04-20 00:03:49 +08:00
|
|
|
LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
|
|
|
|
AC_SUBST(LIBDIR)
|
1999-08-26 04:00:26 +08:00
|
|
|
RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR",
|
|
|
|
[Full path to rpm global configuration directory (usually /usr/lib/rpm)])
|
1998-10-16 00:34:51 +08:00
|
|
|
AC_SUBST(RPMCONFIGDIR)
|
2000-08-28 03:43:51 +08:00
|
|
|
|
1999-04-01 04:37:55 +08:00
|
|
|
SYSCONFIGDIR="`echo /etc/rpm`"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(SYSCONFIGDIR, "$SYSCONFIGDIR",
|
|
|
|
[Full path to rpm system configuration directory (usually /etc/rpm)])
|
1999-04-01 04:37:55 +08:00
|
|
|
AC_SUBST(SYSCONFIGDIR)
|
2000-08-28 03:43:51 +08:00
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
MACROFILES="${RPMCONFIGDIR}/macros:${RPMCONFIGDIR}/%{_target_platform}/macros:${SYSCONFIGDIR}/macros:${SYSCONFIGDIR}/macros.specspo:${SYSCONFIGDIR}/macros.db1:${SYSCONFIGDIR}/%{_target_platform}/macros:~/.rpmmacros"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(MACROFILES, "$MACROFILES",
|
|
|
|
[Colon separated paths of macro files to read.])
|
2000-08-28 03:43:51 +08:00
|
|
|
AC_SUBST(MACROFILES)
|
|
|
|
|
2000-09-14 19:42:48 +08:00
|
|
|
LIBRPMRC_FILENAME="${RPMCONFIGDIR}/rpmrc"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(LIBRPMRC_FILENAME, "$LIBRPMRC_FILENAME",
|
|
|
|
[Full path to rpmrc configuration file (usually /usr/lib/rpm/rpmrc)])
|
2000-09-14 19:42:48 +08:00
|
|
|
AC_SUBST(LIBRPMRC_FILENAME)
|
|
|
|
|
2002-06-10 06:15:16 +08:00
|
|
|
VENDORRPMRC_FILENAME="${RPMCONFIGDIR}/${RPMCANONVENDOR}/rpmrc"
|
|
|
|
AC_DEFINE_UNQUOTED(VENDORRPMRC_FILENAME, "$VENDORRPMRC_FILENAME",
|
|
|
|
[Full path to vendor rpmrc configuration file (usually /usr/lib/rpm/vendor/rpmrc)])
|
|
|
|
AC_SUBST(VENDORRPMRC_FILENAME)
|
|
|
|
|
2000-06-22 21:39:44 +08:00
|
|
|
LIBRPMALIAS_FILENAME="${RPMCONFIGDIR}/rpmpopt-${VERSION}"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(LIBRPMALIAS_FILENAME, "$LIBRPMALIAS_FILENAME",
|
|
|
|
[Full path to rpmpopt configuration file (usually /usr/lib/rpm/rpmpopt)])
|
1998-10-16 00:34:51 +08:00
|
|
|
AC_SUBST(LIBRPMALIAS_FILENAME)
|
1999-01-27 02:29:40 +08:00
|
|
|
FINDREQUIRES="${RPMCONFIGDIR}/find-requires"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(FINDREQUIRES, "$FINDREQUIRES",
|
|
|
|
[Full path to find-requires script (usually /usr/lib/rpm/find-requires)])
|
1998-10-16 00:34:51 +08:00
|
|
|
AC_SUBST(FINDREQUIRES)
|
1999-01-27 02:29:40 +08:00
|
|
|
FINDPROVIDES="${RPMCONFIGDIR}/find-provides"
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_DEFINE_UNQUOTED(FINDPROVIDES, "$FINDPROVIDES",
|
|
|
|
[Full path to find-provides script (usually /usr/lib/rpm/find-provides)])
|
1998-10-16 00:34:51 +08:00
|
|
|
AC_SUBST(FINDPROVIDES)
|
|
|
|
|
1998-10-20 19:54:13 +08:00
|
|
|
testdir="`pwd`/tests"
|
|
|
|
dnl AC_DEFINE_UNQUOTED(testdir, "$testdir")
|
|
|
|
AC_SUBST(testdir)
|
|
|
|
|
1996-09-29 10:27:07 +08:00
|
|
|
AC_SUBST(INCPATH)
|
2002-05-02 06:13:00 +08:00
|
|
|
AC_SUBST(LIBMISC)
|
1998-10-08 22:59:17 +08:00
|
|
|
|
1996-12-12 11:56:30 +08:00
|
|
|
AC_SUBST(RPM)
|
1996-08-20 01:15:47 +08:00
|
|
|
|
2000-12-04 08:55:17 +08:00
|
|
|
AC_SUBST(OBJDUMP)
|
|
|
|
|
2000-01-04 02:32:49 +08:00
|
|
|
dnl XXX this causes popt to depend on zlib et al
|
|
|
|
dnl # XXX Propagate -lucb to popt ...
|
|
|
|
dnl export LIBS INCPATH CONFIG_SITE
|
1998-10-06 01:26:46 +08:00
|
|
|
|
2002-10-16 02:44:16 +08:00
|
|
|
AC_CONFIG_SUBDIRS(popt beecrypt zlib elfutils file db3)
|
2001-05-08 03:21:16 +08:00
|
|
|
|
2004-01-05 22:09:47 +08:00
|
|
|
AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec
|
2001-05-08 08:03:14 +08:00
|
|
|
rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
|
2002-07-31 23:13:46 +08:00
|
|
|
scripts/Makefile scripts/brp-redhat
|
|
|
|
scripts/macros.perl scripts/macros.php scripts/macros.python
|
|
|
|
tools/Makefile
|
1998-10-20 21:40:27 +08:00
|
|
|
tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
|
2002-02-11 05:13:52 +08:00
|
|
|
misc/Makefile intl/Makefile po/Makefile.in
|
2002-06-21 01:17:23 +08:00
|
|
|
doc/Makefile
|
|
|
|
doc/manual/Makefile
|
|
|
|
doc/fr/Makefile
|
|
|
|
doc/ja/Makefile
|
|
|
|
doc/ko/Makefile
|
|
|
|
doc/pl/Makefile
|
|
|
|
doc/ru/Makefile
|
|
|
|
doc/sk/Makefile
|
|
|
|
python/Makefile
|
|
|
|
python/rpmdb/Makefile
|
2003-05-06 05:44:49 +08:00
|
|
|
python/rpmdb/test/Makefile
|
2004-03-17 05:58:25 +08:00
|
|
|
lua/Makefile
|
2004-01-05 22:09:47 +08:00
|
|
|
])
|
|
|
|
AC_CONFIG_COMMANDS([default],[[ echo timestamp > popt/stamp-h.in
|
2001-05-08 03:21:16 +08:00
|
|
|
echo timestamp > stamp-h.in
|
2004-01-05 22:09:47 +08:00
|
|
|
|
|
|
|
]],[[]])
|
|
|
|
AC_OUTPUT
|