Mercurial > hg > forks > geeqie
annotate autogen.sh @ 2898:790a598fc09e
Merge merge requests 649, 647 and 651
Just pro forma as they are already in the history.
* github/merge-requests/649:
Tell Git to ignore .desktop files globally
* github/merge-requests/647:
rename configure.in to configure.ac
* github/merge-requests/651:
Fix fullscreen spanning multiple monitors
author | Klaus Ethgen <Klaus@Ethgen.de> |
---|---|
date | Tue, 05 Feb 2019 21:14:17 +0100 |
parents | 75a6cfa891aa |
children | 5867602f7a60 |
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 | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
9 (test -f $srcdir/configure.in \ |
1 | 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 | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
27 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && { |
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
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." |
686
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
32 echo "glib-gettextize is a part of glib." |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
33 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" |
1 | 34 DIE=1 |
35 } | |
36 } | |
37 | |
1648
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
38 (intltoolize --version) < /dev/null > /dev/null 2>&1 || { |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
39 echo |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
40 echo "**Error**: You must have \`intltoolize' installed" |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
41 DIE=1 |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
42 } |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
43 |
686
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
44 (automake --version) < /dev/null > /dev/null 2>&1 || { |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
45 echo |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
46 echo "**Error**: You must have \`automake' installed." |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
47 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
48 DIE=1 |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
49 NO_AUTOMAKE=yes |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
50 } |
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
51 |
1 | 52 # if no automake, don't bother testing for aclocal |
53 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { | |
54 echo | |
55 echo "**Error**: Missing \`aclocal'. The version of \`automake'" | |
56 echo "installed doesn't appear recent enough." | |
686
9fda5376ef54
configure.in was rewritten:
Petr Ostadal <postadal@suse.cz>
parents:
420
diff
changeset
|
57 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" |
1 | 58 DIE=1 |
59 } | |
60 | |
61 if test "$DIE" -eq 1; then | |
62 exit 1 | |
63 fi | |
64 | |
65 if test -z "$*"; then | |
66 echo "**Warning**: I am going to run \`configure' with no arguments." | |
67 echo "If you wish to pass any to it, please specify them on the" | |
68 echo \`$0\'" command line." | |
69 echo | |
70 fi | |
71 | |
72 case $CC in | |
73 xlc ) | |
74 am_opt=--include-deps;; | |
75 esac | |
76 | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
77 auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *( *\([^ )]*\).*/\1/p' $srcdir/configure.in`" |
688 | 78 if test -n "$auxdir"; then |
79 if test ! -d "$srcdir/$auxdir"; then | |
80 mkdir -p "$srcdir/$auxdir" | |
81 fi fi | |
82 | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
83 for coin in `find $srcdir -name configure.in -print` |
1 | 84 do |
85 dr=`dirname $coin` | |
86 if test -f $dr/NO-AUTO-GEN; then | |
87 echo skipping $dr -- flagged as no auto-gen | |
88 else | |
89 echo processing $dr | |
90 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` | |
91 ( cd $dr | |
92 aclocalinclude="$ACLOCAL_FLAGS" | |
93 for k in $macrodirs; do | |
94 if test -d $k; then | |
95 aclocalinclude="$aclocalinclude -I $k" | |
96 ##else | |
97 ## echo "**Warning**: No such directory \`$k'. Ignored." | |
98 fi | |
99 done | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
100 if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then |
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
101 if grep "sed.*POTFILES" configure.in >/dev/null; then |
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
102 : do nothing -- we still have an old unmodified configure.in |
1 | 103 else |
104 echo "Creating $dr/aclocal.m4 ..." | |
105 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 | |
11 | 106 echo "Running glib-gettextize..." |
107 echo "no" | glib-gettextize --force --copy | |
1648
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
108 echo "Running intltoolize" |
9876a7be646c
use intltool for desktop file translation
Vladimir Nadvornik <nadvornik@suse.cz>
parents:
1263
diff
changeset
|
109 intltoolize --copy --force --automake |
1787
839bc1ebeadc
Workaround intltoolize 0.40.6 bug related to LINGUAS, see bug 2817602.
Laurent Monin <geeqie@norz.org>
parents:
1648
diff
changeset
|
110 if intltoolize --version | grep -q ' 0.40.6'; then |
839bc1ebeadc
Workaround intltoolize 0.40.6 bug related to LINGUAS, see bug 2817602.
Laurent Monin <geeqie@norz.org>
parents:
1648
diff
changeset
|
111 echo "Workaround intltoolize 0.40.6 bug (LINGUAS)" |
839bc1ebeadc
Workaround intltoolize 0.40.6 bug related to LINGUAS, see bug 2817602.
Laurent Monin <geeqie@norz.org>
parents:
1648
diff
changeset
|
112 sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in |
839bc1ebeadc
Workaround intltoolize 0.40.6 bug related to LINGUAS, see bug 2817602.
Laurent Monin <geeqie@norz.org>
parents:
1648
diff
changeset
|
113 fi |
1 | 114 echo "Making $dr/aclocal.m4 writable ..." |
115 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 | |
116 fi | |
117 fi | |
118 echo "Running aclocal $aclocalinclude ..." | |
119 aclocal $aclocalinclude | |
2898
790a598fc09e
Merge merge requests 649, 647 and 651
Klaus Ethgen <Klaus@Ethgen.de>
parents:
2895
diff
changeset
|
120 if grep "^AC_CONFIG_HEADER" configure.in >/dev/null; then |
1 | 121 echo "Running autoheader..." |
122 autoheader | |
123 fi | |
124 echo "Running automake --gnu $am_opt ..." | |
125 automake --add-missing --gnu $am_opt | |
126 echo "Running autoconf ..." | |
127 autoconf | |
128 ) | |
129 fi | |
130 done | |
131 | |
1263
4baa7a9f2a0c
Remove --enable-compile-warnings from autogen.sh, it was passed to configure which knows nothing about this option.
Laurent Monin <geeqie@norz.org>
parents:
688
diff
changeset
|
132 conf_flags="--enable-maintainer-mode" #--enable-iso-c |
1 | 133 |
134 if test x$NOCONFIGURE = x; then | |
135 echo Running $srcdir/configure $conf_flags "$@" ... | |
136 $srcdir/configure $conf_flags "$@" \ | |
137 && echo Now type \`make\' to compile $PKG_NAME | |
138 else | |
139 echo Skipping configure process. | |
140 fi |