Update po files by running make update-po manually in gschem/po
[geda-gaf/whiteaudio.git] / gschem / autogen.sh
blobb06a5b7f2540342deff92dbc1ac7f92b257e9f09
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.in
11 # Possible names for libtool/libtoolize
12 libtoolize_candidates="libtoolize glibtoolize"
14 DIE=0
16 (test -f $srcdir/$configure_script) || {
17 echo -n "**Error**: Directory [ $srcdir ] does not look like the"
18 echo " top-level package directory"
19 exit 1
22 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
23 echo
24 echo "**Error**: You must have \`autoconf' installed."
25 echo "Download the appropriate package for your distribution,"
26 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
27 DIE=1
30 (grep "^AM_PROG_LIBTOOL" $srcdir/$configure_script >/dev/null) && {
31 LIBTOOLIZE=`which $libtoolize_candidates 2>/dev/null | head -n1`
32 (! test -z "$LIBTOOLIZE") || {
33 echo
34 echo "**Error**: You must have \`libtool' installed."
35 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
36 DIE=1
40 (grep "^AM_GNU_GETTEXT" $srcdir/$configure_script >/dev/null) && {
41 (grep "sed.*POTFILES" $srcdir/$configure_script) > /dev/null || \
42 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
43 echo
44 echo "**Error**: You must have \`gettext' installed."
45 echo "You can get it from: http://www.gnu.org/software/gettext"
46 DIE=1
50 (automake --version) < /dev/null > /dev/null 2>&1 || {
51 echo
52 echo "**Error**: You must have \`automake' installed."
53 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
54 DIE=1
55 NO_AUTOMAKE=yes
59 # if no automake, don't bother testing for aclocal
60 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
61 echo
62 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
63 echo "installed doesn't appear recent enough."
64 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
65 DIE=1
68 if test "$DIE" -eq 1; then
69 exit 1
72 # Don't run configure automatically.
73 #if test -z "$*"; then
74 # echo "**Warning**: I am going to run \`configure' with no arguments."
75 # echo "If you wish to pass any to it, please specify them on the"
76 # echo \`$0\'" command line."
77 # echo
78 #fi
80 case $CC in
81 xlc )
82 am_opt=--include-deps;;
83 esac
85 # Create the configure.ac from the configure.ac.in file.
86 # The below line to get the gettext version isn't the most robust construct
87 # because if gettext changes its version output format, this will break.
88 installed_gettext_version=`gettext --version | grep gettext | awk '{print $4}'`
89 cat $configure_script | \
90 sed "s/%INSTALLED_GETTEXT_VERSION%/$installed_gettext_version/" > configure.ac
91 configure_script=configure.ac
93 for coin in $srcdir/$configure_script
94 do
95 dr=`dirname $coin`
96 if test -f $dr/NO-AUTO-GEN; then
97 echo skipping $dr -- flagged as no auto-gen
98 else
99 echo processing $dr
100 ( cd $dr
102 aclocalinclude="$ACLOCAL_FLAGS"
104 if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
105 echo "autogen.sh running: autopoint ..."
106 echo "no" | autopoint --force
107 #echo "Creating $dr/po/Makevars ..."
108 #mv -f $dr/po/Makevars.template $dr/po/Makevars
110 if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
111 echo "autogen.sh running: libtoolize ..."
112 $LIBTOOLIZE --force --copy
114 echo "autogen.sh running: aclocal $aclocalinclude ..."
115 aclocal $aclocalinclude
116 if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
117 echo "autogen.sh running: autoheader ..."
118 autoheader
120 echo "autogen.sh running: automake $am_opt ..."
121 automake --copy --add-missing --gnu $am_opt
122 echo "autogen.sh running: autoconf ..."
123 autoconf
126 done
129 # Don't run configure.
130 #conf_flags="--enable-maintainer-mode"
132 #if test x$NOCONFIGURE = x; then
133 # echo Running $srcdir/configure $conf_flags "$@" ...
134 # $srcdir/configure $conf_flags "$@" \
135 # && echo Now type \`make\' to compile. || exit 1
136 #else
137 # echo Skipping configure process.