1998-03-05 00:53:54 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
1999-07-27 07:39:34 +08:00
|
|
|
export CFLAGS
|
|
|
|
export LDFLAGS
|
|
|
|
|
2007-06-06 19:40:54 +08:00
|
|
|
LTV="libtoolize (GNU libtool) 1.5.22"
|
|
|
|
ACV="autoconf (GNU Autoconf) 2.61"
|
|
|
|
AMV="automake (GNU automake) 1.10"
|
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:
|
2007-06-06 19:40:54 +08:00
|
|
|
libtool-1.5.22
|
|
|
|
autoconf-2.61
|
|
|
|
automake-1.10
|
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
|
|
|
|
|
2007-02-17 00:26:41 +08:00
|
|
|
[ "`$libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
|
|
|
|
[ "`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
|
|
|
|
2007-07-24 19:13:13 +08:00
|
|
|
libtoolize --copy --force
|
|
|
|
autopoint --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
|