Added more info to "Documenting symbols" section
[gtk-doc.git] / autogen.sh
bloba6091f37a8606721ffba26b9082c768fbd3b8425
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 PROJECT=gtk-doc
5 TEST_TYPE=-f
6 FILE=gtk-doc.dsl.in
8 # a silly hack that generates autoregen.sh but it's handy
9 echo "#!/bin/sh" > autoregen.sh
10 echo "./autogen.sh $@ \$@" >> autoregen.sh
11 chmod +x autoregen.sh
13 DIE=0
15 srcdir=`dirname $0`
16 test -z "$srcdir" && srcdir=.
18 THEDIR="`pwd`"
20 cd "$srcdir"
22 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
23 echo
24 echo "You must have autoconf installed to compile $PROJECT."
25 echo "Download the appropriate package for your distribution,"
26 echo "or get the source tarball at ftp://ftp.gnu.org/gnu/autoconf/"
27 DIE=1
30 if automake --version < /dev/null > /dev/null 2>&1; then
31 AUTOMAKE=automake
32 ACLOCAL=aclocal
33 elif automake-1.11 --version < /dev/null > /dev/null 2>&1; then
34 AUTOMAKE=automake-1.11
35 ACLOCAL=aclocal-1.11
36 elif automake-1.10 --version < /dev/null > /dev/null 2>&1; then
37 AUTOMAKE=automake-1.10
38 ACLOCAL=aclocal-1.10
39 elif automake-1.9 --version < /dev/null > /dev/null 2>&1; then
40 AUTOMAKE=automake-1.9
41 ACLOCAL=aclocal-1.9
42 elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
43 AUTOMAKE=automake-1.8
44 ACLOCAL=aclocal-1.8
45 elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
46 AUTOMAKE=automake-1.7
47 ACLOCAL=aclocal-1.7
48 elif automake-1.6 --version < /dev/null > /dev/null 2>&1; then
49 AUTOMAKE=automake-1.6
50 ACLOCAL=aclocal-1.6
51 else
52 echo
53 echo "You must have automake installed to compile $PROJECT."
54 echo "Download the appropriate package for your distribution,"
55 echo "or get the source tarball at ftp://ftp.gnu.org/gnu/automake/"
56 DIE=1
59 if test "$DIE" -eq 1; then
60 exit 1
63 test $TEST_TYPE $FILE || {
64 echo "You must run this script in the top-level $PROJECT directory"
65 exit 1
68 if test "$#" = 0; then
69 echo "I am going to run ./configure with no arguments - if you wish "
70 echo "to pass any to it, please specify them on the $0 command line."
73 if gnome-doc-prepare --version < /dev/null > /dev/null 2>&1; then
74 echo "* Running gnome-doc-prepare"
75 gnome-doc-prepare --copy --force --automake
76 else
77 touch gnome-doc-utils.make
80 # to support timj aclocal setup we are shipping gnome-doc-utils.m4
81 # and making sure automake picks it up ;)
82 # this is bad as -I prepends to the search path
83 echo "* Running $ACLOCAL"
84 $ACLOCAL $ACLOCAL_FLAGS -I m4 || exit $?
86 echo "* Running autoconf"
87 autoconf || exit $?
88 # optionally feature autoheader
89 #(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
91 echo "* Running libtoolize"
92 libtoolize --copy --force
94 echo "* Running $AUTOMAKE"
95 $AUTOMAKE --add-missing -Wno-portability $am_opt || exit $?
97 cd "$THEDIR"
99 $srcdir/configure --enable-maintainer-mode "$@" || exit $?
101 echo
102 echo "Now type 'make install' to install $PROJECT."