26
|
1 #!/bin/sh
|
|
2 # Run this to generate all the initial makefiles, etc.
|
|
3
|
|
4 srcdir=`dirname $0`
|
|
5 test -z "$srcdir" && srcdir=.
|
|
6
|
|
7 ORIGDIR=`pwd`
|
|
8 cd $srcdir
|
|
9 PROJECT=gFTP
|
|
10 TEST_TYPE=-f
|
|
11 FILE=lib/gftp.h
|
|
12
|
|
13 DIE=0
|
|
14
|
|
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
|
16 echo
|
|
17 echo "You must have autoconf installed to compile $PROJECT."
|
|
18 echo "libtool the appropriate package for your distribution,"
|
|
19 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
|
20 DIE=1
|
|
21 }
|
|
22
|
|
23 have_automake=false
|
|
24 if automake-1.4 --version < /dev/null > /dev/null 2>&1 ; then
|
|
25 automake_version=`automake-1.4 --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
|
26 case $automake_version in
|
|
27 1.2*|1.3*|1.4)
|
|
28 ;;
|
|
29 *)
|
|
30 have_automake=true
|
|
31 ;;
|
|
32 esac
|
|
33 fi
|
|
34 if $have_automake ; then : ; else
|
|
35 echo
|
|
36 echo "You must have automake 1.4-p1 installed to compile $PROJECT."
|
|
37 echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
|
|
38 echo "(or a newer version if it is available)"
|
|
39 DIE=1
|
|
40 fi
|
|
41
|
|
42 have_gettext=false
|
|
43 if xgettext --version 2>/dev/null | grep 'GNU' > /dev/null ; then
|
|
44 have_gettext=true
|
|
45 fi
|
|
46
|
|
47 if $have_gettext ; then : ; else
|
|
48 echo
|
|
49 echo "GNU gettext must be installed to build GLib from CVS"
|
|
50 echo "GNU gettext is available from http://www.gnu.org/software/gettext/"
|
|
51 DIE=1
|
|
52 fi
|
|
53
|
|
54 if test "$DIE" -eq 1; then
|
|
55 exit 1
|
|
56 fi
|
|
57
|
|
58 test $TEST_TYPE $FILE || {
|
|
59 echo "You must run this script in the top-level $PROJECT directory"
|
|
60 exit 1
|
|
61 }
|
|
62
|
|
63 if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
|
64 if test -z "$*"; then
|
|
65 echo "I am going to run ./configure with no arguments - if you wish "
|
|
66 echo "to pass any to it, please specify them on the $0 command line."
|
|
67 fi
|
|
68 fi
|
|
69
|
|
70 case $CC in
|
|
71 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
|
72 esac
|
|
73
|
41
|
74 gettextize -f -c --intl --no-changelog
|
26
|
75
|
|
76 aclocal-1.4 $ACLOCAL_FLAGS
|
|
77
|
|
78 # optionally feature autoheader
|
|
79 (autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
|
80
|
36
|
81 automake-1.4 -a -c $am_opt
|
26
|
82 autoconf
|
|
83 cd $ORIGDIR
|
|
84
|
|
85 if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
33
|
86 CFLAGS="-Wall -ansi -D_GNU_SOURCE -O -g" $srcdir/configure --enable-maintainer-mode "$@"
|
26
|
87
|
|
88 echo
|
|
89 echo "Now type 'make' to compile $PROJECT."
|
|
90 fi
|