Add "-L" flags to LDFLAGS, not LIBS, and get rid of all the exotic
[obnox/wireshark/wip.git] / autogen.sh
1 #!/bin/sh
2 #
3 # Run this to generate all the initial makefiles.
4 #
5 # $Id: autogen.sh,v 1.7 1999/12/30 21:34:58 guy Exp $
6
7 DIE=0
8 PROJECT="Ethereal"
9
10 #
11 # XXX - we should really get the version numbers into variables, and
12 # check to make sure they have a recent enough version, but I'm
13 # not sure that the version strings you get are amenable to ordered
14 # comparisons (e.g., I think some versions of Red Hat Linux may have
15 # version numbers such as "1.4a"); that may be soluble, but it might
16 # take some work.
17 #
18 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
19         echo
20         echo "You must have autoconf 2.13 or later installed to compile $PROJECT."
21         echo "Download the appropriate package for your distribution/OS,"
22         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
23         DIE=1
24 }
25
26 (automake --version) < /dev/null > /dev/null 2>&1 || {
27         echo
28         echo "You must have automake 1.4 or later installed to compile $PROJECT."
29         echo "Download the appropriate package for your distribution/OS,"
30         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
31         DIE=1
32 }
33
34 (libtool --version) < /dev/null > /dev/null 2>&1 || {
35         echo
36         echo "You must have libtool 1.3.4 or later installed to compile $PROJECT."
37         echo "Download the appropriate package for your distribution/OS,"
38         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/"
39         DIE=1
40 }
41
42 if test "$DIE" -eq 1 ; then
43         exit 1
44 fi
45
46 if test -z "$*"; then
47         echo "Running ./configure with no arguments. If you wish to pass any,"
48         echo "please specify them on the $0 command line."
49 fi
50
51 for dir in . wiretap ;  do
52         echo processing $dir
53         (cd $dir; \
54                 aclocalinclude="$ACLOCAL_FLAGS"; \
55                 aclocal $aclocalinclude; \
56                 autoheader; automake --add-missing --gnu $am_opt; autoconf)
57 done
58
59 ./configure "$@"
60
61 echo
62 echo "Now type 'make' to compile $PROJECT."