annotate autogen.sh @ 945:3fb46c737594

2008-02-05 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Fix for bug #514613.
author jovanna
date Tue, 05 Feb 2008 21:36:10 +0000
parents 8687b10a0411
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
1 #!/bin/sh
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
2 # Run this to generate all the initial makefiles, etc.
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
3 # This was derived from Glib's autogen.sh
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
4
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
5 srcdir=`dirname $0`
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
6 test -z "$srcdir" && srcdir=.
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
7
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
8 ORIGDIR=`pwd`
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
9 cd $srcdir
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
10 PROJECT=gFTP
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
11 TEST_TYPE=-f
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
12 FILE=lib/gftp.h
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
13 GETTEXTIZE=gettextize
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
14
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
15 DIE=0
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
16
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
17 AUTOMAKE=automake
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
18 ACLOCAL=aclocal
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
19 AUTOCONF=autoconf
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
20 AUTOHEADER=autoheader
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
21
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
22 autoconf_version=`$AUTOCONF --version 2>/dev/null`
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
23 if [ "x$autoconf_version" = "x" ] ; then
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
24 echo
663
2d3ea4db3106 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
25 echo "GNU autoconf must be installed to build $PROJECT"
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
26 echo "GNU autoconf is available from http://www.gnu.org/software/autoconf/"
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
27 DIE=1
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
28 fi
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
29
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
30 automake_version=`$AUTOMAKE --version 2>/dev/null`
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
31 if [ "x$automake_version" = "x" ] ; then
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
32 echo
663
2d3ea4db3106 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
33 echo "GNU automake must be installed to build $PROJECT"
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
34 echo "GNU automake is available from http://www.gnu.org/software/automake/"
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
35 DIE=1
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
36 fi
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
37
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
38 gettext_version=`$GETTEXTIZE --version 2>/dev/null | grep 'GNU'`
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
39 if [ "x$gettext_version" = "x" ] ; then
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
40 echo
663
2d3ea4db3106 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
41 echo "GNU gettext must be installed to build $PROJECT"
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
42 echo "GNU gettext is available from http://www.gnu.org/software/gettext/"
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
43 DIE=1
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
44 fi
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
45
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
46 if test "$DIE" -eq 1; then
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
47 exit 1
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
48 fi
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
49
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
50 test $TEST_TYPE $FILE || {
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
51 echo "You must run this script in the top-level $PROJECT directory"
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
52 exit 1
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
53 }
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
54
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
55 if test -z "$AUTOGEN_SUBDIR_MODE"; then
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
56 if test -z "$*"; then
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
57 echo "I am going to run ./configure with no arguments - if you wish "
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
58 echo "to pass any to it, please specify them on the $0 command line."
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
59 fi
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
60 fi
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
61
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
62 case $CC in
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
63 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
64 esac
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
65
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
66 intl=`$GETTEXTIZE --help 2>/dev/null | grep -- '--intl'`
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
67 if test -z "$intl"; then
545
e850102b64be 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
68 GETTEXTIZE_FLAGS="-c"
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
69 else
869
af346af22fba 2007-1-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 663
diff changeset
70 GETTEXTIZE_FLAGS="-c --intl -f"
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
71 fi
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
72
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
73 echo "$GETTEXTIZE $GETTEXTIZE_FLAGS"
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
74 $GETTEXTIZE $GETTEXTIZE_FLAGS
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
75
901
8687b10a0411 2007-3-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 888
diff changeset
76 mv Makefile.am~ Makefile.am
8687b10a0411 2007-3-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 888
diff changeset
77 mv configure.in~ configure.in
8687b10a0411 2007-3-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 888
diff changeset
78
888
6032e7cfba5c 2007-3-12 Brian Masney <masneyb@gftp.org>
masneyb
parents: 869
diff changeset
79 ACLOCAL_FLAGS="-I m4"
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
80 echo "$ACLOCAL $ACLOCAL_FLAGS"
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
81 $ACLOCAL $ACLOCAL_FLAGS
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
82
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
83 # optionally feature autoheader
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
84 ($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 && $AUTOHEADER
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
85
195
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
86 AUTOMAKE_FLAGS="-a -c $am_opt"
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
87 echo "$AUTOMAKE $AUTOMAKE_FLAGS"
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
88 $AUTOMAKE $AUTOMAKE_FLAGS
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
89
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
90 echo $AUTOCONF
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
91 $AUTOCONF
3fa7b4f4ab78 2003-6-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 171
diff changeset
92
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
93 cd $ORIGDIR
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
94
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
95 if test -z "$AUTOGEN_SUBDIR_MODE"; then
553
b2b4f5fa8fc7 2004-9-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 545
diff changeset
96 CFLAGS="-Wall -W -Wno-long-long -Wno-unused-parameter -ansi -D_GNU_SOURCE -O -g" $srcdir/configure "$@"
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
97
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
98 echo
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
99 echo "Now type 'make' to compile $PROJECT."
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents:
diff changeset
100 fi