autogen.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # autogen.sh
  2. #
  3. # invoke the auto* tools to create the configureation system
  4. # move out configure.in
  5. if ! test -f configure.in; then
  6. echo "copying configure.in"
  7. ln -s makefiles/configure.in .
  8. fi
  9. # move out the macros and run aclocal
  10. if test ! -f acinclude.m4 -a -r makefiles/acinclude.m4; then
  11. echo "copying configure macros"
  12. ln -s makefiles/acinclude.m4 .
  13. fi
  14. # copy up our Makefile template
  15. if ! test -f Makefile.am; then
  16. echo "copying automake template"
  17. ln -s makefiles/Makefile.am .
  18. fi
  19. echo "running aclocal"
  20. aclocal
  21. # libtool is named glibtool on MacOS X
  22. for LIBTOOLIZE in libtoolize glibtoolize nope; do
  23. ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
  24. done
  25. if test x$LIBTOOLIZE = xnope; then
  26. echo "error: Could not find libtoolize in the path!"
  27. echo " You'll need to install a copy of libtool before continuing"
  28. echo " with the generation of the build system."
  29. echo
  30. exit 1
  31. fi
  32. echo "running $LIBTOOLIZE"
  33. $LIBTOOLIZE --automake
  34. echo "running automake"
  35. automake --foreign --add-missing
  36. echo "building configure script"
  37. autoconf
  38. # and finally invoke our new configure
  39. ./configure $*
  40. # end