1998-03-05 00:53:54 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
1999-07-27 07:39:34 +08:00
|
|
|
export CFLAGS
|
|
|
|
export LDFLAGS
|
|
|
|
|
2005-07-18 02:34:44 +08:00
|
|
|
LTV="libtoolize (GNU libtool) 1.5.18"
|
2003-12-16 11:41:35 +08:00
|
|
|
ACV="autoconf (GNU Autoconf) 2.59"
|
2005-02-17 03:05:36 +08:00
|
|
|
AMV="automake (GNU automake) 1.9.5"
|
1999-01-27 03:55:43 +08:00
|
|
|
USAGE="
|
2001-06-29 06:19:08 +08:00
|
|
|
This script documents the versions of the tools I'm using to build rpm:
|
2005-07-18 02:34:44 +08:00
|
|
|
libtool-1.5.18
|
2003-12-16 11:41:35 +08:00
|
|
|
autoconf-2.59
|
2005-02-17 03:05:36 +08:00
|
|
|
automake-1.9.5
|
2001-06-29 06:19:08 +08:00
|
|
|
Simply edit this script to change the libtool/autoconf/automake versions
|
|
|
|
checked if you need to, as rpm should build (and has built) with all
|
|
|
|
recent versions of libtool/autoconf/automake.
|
1999-01-27 03:55:43 +08:00
|
|
|
"
|
|
|
|
|
2005-01-18 07:58:09 +08:00
|
|
|
libtoolize=`which glibtoolize 2>/dev/null`
|
|
|
|
case $libtoolize in
|
|
|
|
/*) ;;
|
|
|
|
*) libtoolize=`which libtoolize 2>/dev/null`
|
|
|
|
case $libtoolize in
|
|
|
|
/*) ;;
|
|
|
|
*) libtoolize=libtoolize
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" && exit 1
|
2002-02-11 05:13:52 +08:00
|
|
|
[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" && exit 1
|
2005-01-18 07:58:09 +08:00
|
|
|
[ "`automake --version | head -1 | sed -e 's/1\.4[a-z]/1.4/'`" != "$AMV" ] && echo "$USAGE" # && exit 1
|
|
|
|
|
2005-02-13 11:01:09 +08:00
|
|
|
myopts=
|
2005-01-18 07:58:09 +08:00
|
|
|
if [ X"$@" = X -a "X`uname -s`" = "XDarwin" -a -d /opt/local ]; then
|
2005-02-13 11:01:09 +08:00
|
|
|
export myopts="--prefix=/usr --disable-nls"
|
2005-01-18 07:58:09 +08:00
|
|
|
export CPPFLAGS="-I${myprefix}/include"
|
|
|
|
fi
|
1999-01-27 03:55:43 +08:00
|
|
|
|
2002-11-30 05:35:53 +08:00
|
|
|
if [ -d popt ]; then
|
|
|
|
(echo "--- popt"; cd popt; ./autogen.sh --noconfigure "$@")
|
|
|
|
fi
|
|
|
|
if [ -d zlib ]; then
|
|
|
|
(echo "--- zlib"; cd zlib; ./autogen.sh --noconfigure "$@")
|
|
|
|
fi
|
|
|
|
if [ -d beecrypt ]; then
|
|
|
|
(echo "--- beecrypt"; cd beecrypt; ./autogen.sh --noconfigure "$@")
|
|
|
|
fi
|
|
|
|
if [ -d elfutils ]; then
|
|
|
|
(echo "--- elfutils"; cd elfutils; ./autogen.sh --noconfigure "$@")
|
|
|
|
fi
|
|
|
|
if [ -d file ]; then
|
|
|
|
(echo "--- file"; cd file; ./autogen.sh --noconfigure "$@")
|
|
|
|
fi
|
2005-01-24 04:44:57 +08:00
|
|
|
if [ -d neon ]; then
|
|
|
|
(echo "--- neon"; cd neon; ./autogen.sh "$@")
|
|
|
|
fi
|
2002-05-02 06:13:00 +08:00
|
|
|
|
2002-06-20 10:19:21 +08:00
|
|
|
echo "--- rpm"
|
2005-01-18 07:58:09 +08:00
|
|
|
$libtoolize --copy --force
|
1999-01-26 03:46:40 +08:00
|
|
|
aclocal
|
1998-03-05 00:53:54 +08:00
|
|
|
autoheader
|
2002-05-02 06:13:00 +08:00
|
|
|
automake -a -c
|
1998-03-05 00:53:54 +08:00
|
|
|
autoconf
|
|
|
|
|
|
|
|
if [ "$1" = "--noconfigure" ]; then
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
1998-09-06 04:02:08 +08:00
|
|
|
if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
|
2000-06-01 23:40:30 +08:00
|
|
|
if [ -d /usr/share/man ]; then
|
|
|
|
mandir=/usr/share/man
|
|
|
|
infodir=/usr/share/info
|
|
|
|
else
|
|
|
|
mandir=/usr/man
|
|
|
|
infodir=/usr/info
|
|
|
|
fi
|
2002-12-20 23:03:18 +08:00
|
|
|
if [ -d /usr/lib/nptl ]; then
|
|
|
|
enable_posixmutexes="--enable-posixmutexes"
|
|
|
|
else
|
|
|
|
enable_posixmutexes=
|
|
|
|
fi
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} ${enable_posixmutexes} "$@"
|
1998-03-05 00:53:54 +08:00
|
|
|
else
|
2005-02-13 11:01:09 +08:00
|
|
|
./configure ${myopts} "$@"
|
1998-03-05 00:53:54 +08:00
|
|
|
fi
|