Mercurial > geeqie
annotate autogen.sh @ 601:93c6dc4c537b
Add a way to invert the current selection.
An item labeled "Invert selection" was added to the Select submenu
in the main menu.
author | zas_ |
---|---|
date | Wed, 07 May 2008 22:48:30 +0000 |
parents | 53cfc5af7fd7 |
children | c0dda0ffb931 |
rev | line source |
---|---|
1 | 1 #!/bin/sh |
2 # Run this to generate all the initial makefiles, etc. | |
3 | |
4 #this was originally taken from the gnome macros/autogen.sh scripts | |
5 | |
6 srcdir=`dirname $0` | |
7 test -z "$srcdir" && srcdir=. | |
8 | |
9 (test -f $srcdir/configure.in \ | |
10 && test -f $srcdir/src/main.c \ | |
281 | 11 && test -f $srcdir/src/main.h) || { |
1 | 12 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" |
197 | 13 echo " top-level geeqie directory" |
1 | 14 exit 1 |
15 } | |
16 | |
17 DIE=0 | |
18 | |
19 (autoconf --version) < /dev/null > /dev/null 2>&1 || { | |
20 echo | |
21 echo "**Error**: You must have \`autoconf' installed." | |
22 echo "Download the appropriate package for your distribution," | |
23 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" | |
24 DIE=1 | |
25 } | |
26 | |
11 | 27 grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { |
1 | 28 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ |
11 | 29 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { |
1 | 30 echo |
11 | 31 echo "**Error**: You must have \`glib-gettextize' installed." |
32 echo "glib-gettextize is a part of glib" | |
1 | 33 DIE=1 |
34 } | |
35 } | |
36 | |
37 # if no automake, don't bother testing for aclocal | |
38 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | |
39 echo | |
40 echo "**Error**: Missing \`aclocal'. The version of \`automake'" | |
41 echo "installed doesn't appear recent enough." | |
42 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" | |
43 echo "(or a newer version if it is available)" | |
44 DIE=1 | |
45 } | |
46 | |
47 if test "$DIE" -eq 1; then | |
48 exit 1 | |
49 fi | |
50 | |
51 if test -z "$*"; then | |
52 echo "**Warning**: I am going to run \`configure' with no arguments." | |
53 echo "If you wish to pass any to it, please specify them on the" | |
54 echo \`$0\'" command line." | |
55 echo | |
56 fi | |
57 | |
58 case $CC in | |
59 xlc ) | |
60 am_opt=--include-deps;; | |
61 esac | |
62 | |
63 for coin in `find $srcdir -name configure.in -print` | |
64 do | |
65 dr=`dirname $coin` | |
66 if test -f $dr/NO-AUTO-GEN; then | |
67 echo skipping $dr -- flagged as no auto-gen | |
68 else | |
69 echo processing $dr | |
70 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` | |
71 ( cd $dr | |
72 aclocalinclude="$ACLOCAL_FLAGS" | |
73 for k in $macrodirs; do | |
74 if test -d $k; then | |
75 aclocalinclude="$aclocalinclude -I $k" | |
76 ##else | |
77 ## echo "**Warning**: No such directory \`$k'. Ignored." | |
78 fi | |
79 done | |
11 | 80 if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then |
1 | 81 if grep "sed.*POTFILES" configure.in >/dev/null; then |
82 : do nothing -- we still have an old unmodified configure.in | |
83 else | |
84 echo "Creating $dr/aclocal.m4 ..." | |
85 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 | |
11 | 86 echo "Running glib-gettextize..." |
87 echo "no" | glib-gettextize --force --copy | |
420
53cfc5af7fd7
Add the possibility to update only one translation file using,
zas_
parents:
281
diff
changeset
|
88 if [ -r po/Makefile.in.in.patch ]; then |
53cfc5af7fd7
Add the possibility to update only one translation file using,
zas_
parents:
281
diff
changeset
|
89 patch po/Makefile.in.in < po/Makefile.in.in.patch |
53cfc5af7fd7
Add the possibility to update only one translation file using,
zas_
parents:
281
diff
changeset
|
90 fi |
1 | 91 echo "Making $dr/aclocal.m4 writable ..." |
92 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 | |
93 fi | |
94 fi | |
95 echo "Running aclocal $aclocalinclude ..." | |
96 aclocal $aclocalinclude | |
11 | 97 if grep "^AC_CONFIG_HEADER" configure.in >/dev/null; then |
1 | 98 echo "Running autoheader..." |
99 autoheader | |
100 fi | |
101 echo "Running automake --gnu $am_opt ..." | |
102 automake --add-missing --gnu $am_opt | |
103 echo "Running autoconf ..." | |
104 autoconf | |
105 ) | |
106 fi | |
107 done | |
108 | |
109 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c | |
110 | |
111 if test x$NOCONFIGURE = x; then | |
112 echo Running $srcdir/configure $conf_flags "$@" ... | |
113 $srcdir/configure $conf_flags "$@" \ | |
114 && echo Now type \`make\' to compile $PKG_NAME | |
115 else | |
116 echo Skipping configure process. | |
117 fi |