fix minor bug with the --with-pcbconfdir option
[geda-gaf/peter-b.git] / geda / autogen.sh
blobf66ab4ab570bd54c178f6b312c7d5f2c5c4162c5
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 # This file came from glade-2.0.0 with modifications for gEDA/gaf.
5 # Ales Hvezda 11/09/2003
7 srcdir=`dirname $0`
8 test -z "$srcdir" && srcdir=.
9 configure_script=configure.ac
11 DIE=0
13 (test -f $srcdir/$configure_script) || {
14 echo -n "**Error**: Directory [ $srcdir ] does not look like the"
15 echo " top-level package directory"
16 exit 1
19 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
20 echo
21 echo "**Error**: You must have \`autoconf' installed."
22 echo "Download the appropriate package for your distribution,"
23 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
24 DIE=1
27 (grep "^AM_PROG_LIBTOOL" $srcdir/$configure_script >/dev/null) && {
28 (libtool --version) < /dev/null > /dev/null 2>&1 || {
29 echo
30 echo "**Error**: You must have \`libtool' installed."
31 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
32 DIE=1
36 (grep "^AM_GNU_GETTEXT" $srcdir/$configure_script >/dev/null) && {
37 (grep "sed.*POTFILES" $srcdir/$configure_script) > /dev/null || \
38 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
39 echo
40 echo "**Error**: You must have \`gettext' installed."
41 echo "You can get it from: http://www.gnu.org/software/gettext"
42 DIE=1
46 (automake --version) < /dev/null > /dev/null 2>&1 || {
47 echo
48 echo "**Error**: You must have \`automake' installed."
49 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
50 DIE=1
51 NO_AUTOMAKE=yes
55 # if no automake, don't bother testing for aclocal
56 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
57 echo
58 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
59 echo "installed doesn't appear recent enough."
60 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
61 DIE=1
64 if test "$DIE" -eq 1; then
65 exit 1
68 # Don't run configure automatically.
69 #if test -z "$*"; then
70 # echo "**Warning**: I am going to run \`configure' with no arguments."
71 # echo "If you wish to pass any to it, please specify them on the"
72 # echo \`$0\'" command line."
73 # echo
74 #fi
76 case $CC in
77 xlc )
78 am_opt=--include-deps;;
79 esac
81 for coin in `find $srcdir -name $srcdir/CVS -prune -o -name $configure_script -print`
82 do
83 dr=`dirname $coin`
84 if test -f $dr/NO-AUTO-GEN; then
85 echo skipping $dr -- flagged as no auto-gen
86 else
87 echo processing $dr
88 ( cd $dr
90 aclocalinclude="$ACLOCAL_FLAGS"
92 if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
93 echo "autogen.sh running: autopoint ..."
94 echo "no" | autopoint --force
95 #echo "Creating $dr/po/Makevars ..."
96 #mv -f $dr/po/Makevars.template $dr/po/Makevars
98 if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
99 if test -z "$NO_LIBTOOLIZE" ; then
100 echo "autogen.sh running: libtoolize ..."
101 libtoolize --force --copy
104 echo "autogen.sh running: aclocal $aclocalinclude ..."
105 aclocal $aclocalinclude
106 if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
107 echo "autogen.sh running: autoheader ..."
108 autoheader
110 echo "autogen.sh running: automake $am_opt ..."
111 automake --copy --add-missing --gnu $am_opt
112 echo "autogen.sh running: autoconf ..."
113 autoconf
116 done
119 # Don't run configure.
120 #conf_flags="--enable-maintainer-mode"
122 #if test x$NOCONFIGURE = x; then
123 # echo Running $srcdir/configure $conf_flags "$@" ...
124 # $srcdir/configure $conf_flags "$@" \
125 # && echo Now type \`make\' to compile. || exit 1
126 #else
127 # echo Skipping configure process.