autogen.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/sh
  2. #
  3. # Run this to generate all the initial makefiles, etc.
  4. #
  5. PKG_NAME=Firebird6
  6. SRCDIR=`dirname $0`
  7. if [ -z "$AUTORECONF" ]
  8. then
  9. AUTORECONF=autoreconf
  10. fi
  11. echo "AUTORECONF="$AUTORECONF
  12. # This prevents calling automake in old autotools
  13. AUTOMAKE=true
  14. export AUTOMAKE
  15. # This helps some old aclocal versions find binreloc.m4 in current directory
  16. ACLOCAL='aclocal -I .'
  17. export ACLOCAL
  18. # Give a warning if no arguments to 'configure' have been supplied.
  19. if test -z "$*" -a x$NOCONFIGURE = x; then
  20. echo "**Warning**: I am going to run \`configure' with no arguments."
  21. echo "If you wish to pass any to it, please specify them on the"
  22. echo \`$0\'" command line."
  23. echo
  24. fi
  25. # Some versions of autotools need it
  26. if [ ! -d m4 ]; then
  27. rm -rf m4
  28. mkdir m4
  29. fi
  30. # Ensure correct utilities are called by AUTORECONF
  31. autopath=`dirname $AUTORECONF`
  32. if [ "x$autopath" != "x" ]; then
  33. PATH=$autopath:$PATH
  34. export PATH
  35. fi
  36. echo "Running autoreconf ..."
  37. $AUTORECONF --install --force --verbose || exit 1
  38. # Hack to bypass bug in autoreconf - --install switch not passed to libtoolize,
  39. # therefore missing config.sub and confg.guess files
  40. CONFIG_AUX_DIR=builds/make.new/config
  41. if [ ! -f $CONFIG_AUX_DIR/config.sub -o ! -f $CONFIG_AUX_DIR/config.guess ]; then
  42. # re-run libtoolize with --install switch, if it does not understand that switch
  43. # and there are no config.sub/guess files in CONFIG_AUX_DIR, we will anyway fail
  44. echo "Re-running libtoolize ..."
  45. if [ -z "$LIBTOOLIZE" ]; then
  46. LIBTOOLIZE=libtoolize
  47. fi
  48. $LIBTOOLIZE --install --copy --force || exit 1
  49. fi
  50. # If NOCONFIGURE is set, skip the call to configure
  51. if test "x$NOCONFIGURE" = "x"; then
  52. echo Running $SRCDIR/configure $conf_flags "$@" ...
  53. rm -f config.cache config.log
  54. chmod a+x $SRCDIR/configure
  55. $SRCDIR/configure $conf_flags "$@" \
  56. && echo Now type \`make\' to compile $PKG_NAME
  57. else
  58. echo Autogen skipping configure process.
  59. fi
  60. # EOF