annotate autogen.sh @ 1673:7b6359fd41af

German translation update
author mow
date Sat, 27 Jun 2009 22:58:20 +0000
parents a57336c3b1cc
children 886746a02b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 #!/bin/sh
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
2 # Run this to generate all the initial makefiles, etc.
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
3
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
4 #this was originally taken from the gnome macros/autogen.sh scripts
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 srcdir=`dirname $0`
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
7 test -z "$srcdir" && srcdir=.
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
8
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
9 (test -f $srcdir/configure.in \
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
10 && test -f $srcdir/src/main.c \
281
9995c5fb202a gqview.h -> main.h
zas_
parents: 197
diff changeset
11 && test -f $srcdir/src/main.h) || {
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
12 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
197
e3f10b6046ab more renames
nadvornik
parents: 11
diff changeset
13 echo " top-level geeqie directory"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
14 exit 1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
15 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
16
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
17 DIE=0
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
18
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
19 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
20 echo
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
21 echo "**Error**: You must have \`autoconf' installed."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
22 echo "Download the appropriate package for your distribution,"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
23 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
24 DIE=1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
25 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
26
686
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
27 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
28 (grep "sed.*POTFILES" $srcdir/configure.in) >/dev/null || \
11
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
29 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
30 echo
11
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
31 echo "**Error**: You must have \`glib-gettextize' installed."
686
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
32 echo "glib-gettextize is a part of glib."
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
33 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
34 DIE=1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
35 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
36 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
37
1648
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
38 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
39 echo
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
40 echo "**Error**: You must have \`intltoolize' installed"
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
41 DIE=1
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
42 }
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
43
686
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
44 (automake --version) < /dev/null > /dev/null 2>&1 || {
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
45 echo
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
46 echo "**Error**: You must have \`automake' installed."
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
47 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
48 DIE=1
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
49 NO_AUTOMAKE=yes
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
50 }
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
51
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
52 # if no automake, don't bother testing for aclocal
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
53 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
54 echo
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
55 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
56 echo "installed doesn't appear recent enough."
686
c0dda0ffb931 configure.in was rewritten:
bruclik
parents: 420
diff changeset
57 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
58 DIE=1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
59 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
60
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
61 if test "$DIE" -eq 1; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
62 exit 1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
63 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
64
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
65 if test -z "$*"; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
66 echo "**Warning**: I am going to run \`configure' with no arguments."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
67 echo "If you wish to pass any to it, please specify them on the"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
68 echo \`$0\'" command line."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
69 echo
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
70 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
71
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
72 case $CC in
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
73 xlc )
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
74 am_opt=--include-deps;;
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
75 esac
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
76
688
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
77 auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *( *\([^ )]*\).*/\1/p' $srcdir/configure.in`"
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
78 if test -n "$auxdir"; then
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
79 if test ! -d "$srcdir/$auxdir"; then
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
80 mkdir -p "$srcdir/$auxdir"
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
81 fi fi
36afa9f48cac Create auxdir if needed.
zas_
parents: 686
diff changeset
82
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
83 for coin in `find $srcdir -name configure.in -print`
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
84 do
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
85 dr=`dirname $coin`
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
86 if test -f $dr/NO-AUTO-GEN; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
87 echo skipping $dr -- flagged as no auto-gen
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
88 else
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
89 echo processing $dr
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
90 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
91 ( cd $dr
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
92 aclocalinclude="$ACLOCAL_FLAGS"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
93 for k in $macrodirs; do
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
94 if test -d $k; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
95 aclocalinclude="$aclocalinclude -I $k"
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
96 ##else
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
97 ## echo "**Warning**: No such directory \`$k'. Ignored."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
98 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
99 done
11
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
100 if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
101 if grep "sed.*POTFILES" configure.in >/dev/null; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
102 : do nothing -- we still have an old unmodified configure.in
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
103 else
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
104 echo "Creating $dr/aclocal.m4 ..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
105 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
11
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
106 echo "Running glib-gettextize..."
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
107 echo "no" | glib-gettextize --force --copy
1648
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
108 echo "Running intltoolize"
a57336c3b1cc use intltool for desktop file translation
nadvornik
parents: 1263
diff changeset
109 intltoolize --copy --force --automake
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
110 echo "Making $dr/aclocal.m4 writable ..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
111 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
112 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
113 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
114 echo "Running aclocal $aclocalinclude ..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
115 aclocal $aclocalinclude
11
3c3b40dbde11 ########
gqview
parents: 1
diff changeset
116 if grep "^AC_CONFIG_HEADER" configure.in >/dev/null; then
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
117 echo "Running autoheader..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
118 autoheader
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
119 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
120 echo "Running automake --gnu $am_opt ..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
121 automake --add-missing --gnu $am_opt
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
122 echo "Running autoconf ..."
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
123 autoconf
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
124 )
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
125 fi
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
126 done
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
127
1263
267943c58be1 Remove --enable-compile-warnings from autogen.sh, it was passed to configure which knows nothing about this option.
zas_
parents: 688
diff changeset
128 conf_flags="--enable-maintainer-mode" #--enable-iso-c
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
129
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
130 if test x$NOCONFIGURE = x; then
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
131 echo Running $srcdir/configure $conf_flags "$@" ...
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
132 $srcdir/configure $conf_flags "$@" \
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
133 && echo Now type \`make\' to compile $PKG_NAME
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
134 else
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
135 echo Skipping configure process.
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
136 fi