autogen.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #! /bin/sh
  2. # autogen.sh
  3. # This re-creates all the "configure" scripts and the like. It is needed
  4. # because I am not using autoconf's own mechanisms for sub-directories
  5. # and so doing an autoreconf once at the top-level is not enough.
  6. #
  7. # Usage:
  8. # autogen.sh [-f | --force]
  9. #
  10. f=""
  11. if test "x$1" = "x-f" || test "x$1" = "x--force"
  12. then
  13. printf "Will force full re-make of all autoconf-related files\n"
  14. f=" -f"
  15. fi
  16. # I want this script to be one I can launch from anywhere.
  17. here="$0";while test -L "$here";do here=`ls -ld "$here" | sed 's/.*-> //'`;done
  18. here=`cd \`dirname "$here"\` ; pwd -P`
  19. save=`pwd`
  20. cd $here
  21. if ! which autoreconf > /dev/null
  22. then
  23. printf "You need to have autoconf and automake installed\n"
  24. printf "I seem not to be able to find the autoreconf command\n"
  25. printf "Stopping...\n"
  26. exit 1
  27. fi
  28. # At an earlier stage I ran autoreconf on several directories even when they
  29. # are not actually used by this simple test. To speed this up and leave it a
  30. # more basic check I now concentrate on what I need immediately.
  31. autoreconf -f -i -v
  32. cd $save
  33. exit 0
  34. # end of autogen.sh