1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#! /bin/sh
# (c) Andreas Barth <aba@muenchen.pro-bahn.de> 1999
# Dieses Programm ermglicht "von Hand" die configure-nderungen zu machen
# und steht unter der GPL
#
# taken from unix-connect-0.94 and hacked up for leafnode
# by Ralf Wildenhues <ralf.wildenhues@gmx.de> 2002
# and Matthias Andree <matthias.andree@gmx.de> 2002
#
# This is subject to the GPL (as stated above in german) and does the
# substitutions done by configure (actually, recent autoconf versions do not
# replace everything until build time; the built script does build time
# replacement. DO NOT reorder the SUBSTNAMES unless you know what you are
# doing!
#
# Tries to extract some configure substitutions from $CONFIGURE_AC and
# is not very intelligent about its syntax. Maybe better use autoconf -t ..
if test $# -ne 1
then
echo >&2 "usage: $0 configure.ac"
exit 1
fi
CONFIGURE_AC="$1"
SUBSTNAMES="VERSION
CPPFLAGS
DEFS
LIBS
prefix
exec_prefix
datarootdir
program_transform_name
bindir
sbindir
libexecdir
datadir
sysconfdir
sharedstatedir
localstatedir
libdir
includedir
oldincludedir
infodir
mandir
CC
RANLIB
AWK
NEWS_USER
"
AUTOSUBSTNAMES=`egrep '^[ ]*AC_SUBST|^[ ]*AC_CHECK_PROGS|^[ ]*AC_PATH_PROG(S)?' $CONFIGURE_AC | \
sed 's/^[ ]*\(AC_.*([^,]*\),.*/\1)/; s/^[ ]*AC_.*(\(.*\))/\1/; s/^\[\(.*\)\]/\1/; s/^[ ]*\(.*\)[ ]*/\1/;'`
echo "#! /bin/sh"
echo "# generated automatically by makesubst -- do not edit"
echo
echo "configure_input=\"DO NOT EDIT -- generated automatically by subst\""
for n in $SUBSTNAMES $AUTOSUBSTNAMES
do
echo "$n=\"@$n@\""
done
echo "LC_ALL=C ; export LC_ALL"
echo "\"@SED@\"" \"
for n in configure_input $SUBSTNAMES $AUTOSUBSTNAMES
do
echo "s%[@]$n@%\$$n%g;"
done
echo \"
|