autogen.sh

Wed, 05 Oct 2016 22:16:07 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Wed, 05 Oct 2016 22:16:07 -0500
branch
provide-uri-handler-desktop-file
changeset 38094
d590d53edaaa
parent 37508
78fc5cfbe275
child 37924
db683ce5d8dc
permissions
-rwxr-xr-x

closing old/merged branches

22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
1 #! /bin/sh
22728
edf01969652e Thanks for pointing this out, grim.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22725
diff changeset
2 # Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
3 # Copyright (C) 2003-2008 Gary Kramlich <grim@reaperworld.com>
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
4 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
5 # This program is free software; you can redistribute it and/or modify it
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
6 # under the terms of the GNU General Public License as published by the Free
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
7 # Software Foundation; either version 2 of the License, or (at your option)
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
8 # any later version.
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
9 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
10 # This program is distributed in the hope that it will be useful, but WITHOUT
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
13 # more details.
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
14 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
15 # You should have received a copy of the GNU General Public License along with
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
16 # this program; if not, write to the Free Software Foundation, Inc., 51
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
17 # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14290
f20819ff8d86 [gaim-migrate @ 16910]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 13294
diff changeset
18
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
19 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
20 # Usage
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
21 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
22 # This script uses a config file that can be used to stash common arguments
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
23 # passed to configure or environment variables that need to be set before
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
24 # configure is called. The configuration file is a simple shell script that
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
25 # gets sourced.
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
26 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
27 # By default, the config file that is used is named 'autogen.args'. This can
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
28 # be configured below.
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
29 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
30 # Available options that are handled are as follow:
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
31 # ACLOCAL_FLAGS - command line arguments to pass to aclocal
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
32 # AUTOCONF_FLAGS - command line arguments to pass to autoconf
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
33 # AUTOHEADER_FLAGS - command line arguments to pass to autoheader
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
34 # AUTOMAKE_FLAGS - command line arguments to pass to automake flags
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
35 # CONFIGURE_FLAGS - command line arguments to pass to configure
22743
f8193b199ff8 Make the new autogen.sh behave more like the old one - run glib-gettextize,
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22742
diff changeset
36 # GLIB_GETTEXTIZE_FLAGS - command line arguments to pass to glib-gettextize
35391
de331168e981 Prepare more for gtk-doc
Ankit Vani <a@nevitus.org>
parents: 34326
diff changeset
37 # GTKDOCIZE_FLAGS - command line arguments to pass to gtkdocize
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
38 # INTLTOOLIZE_FLAGS - command line arguments to pass to intltoolize
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
39 # LIBTOOLIZE_FLAGS - command line arguments to pass to libtoolize
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
40 #
24559
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
41 # Other helpful notes:
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
42 # If you're using a different c compiler, you can override the environment
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
43 # variable in 'autogen.args'. For example, say you're using distcc, just add
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
44 # the following to 'autogen.args':
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
45 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
46 # CC="distcc"
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
47 #
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
48 # This will work for any influential environment variable to configure.
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
49 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
50 PACKAGE="Pidgin"
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
51 ARGS_FILE="autogen.args"
24559
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
52 export CFLAGS
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
53 export LDFLAGS
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
54
22864
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
55 libtoolize="libtoolize"
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
56 case $(uname -s) in
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
57 Darwin*)
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
58 libtoolize="glibtoolize"
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
59 ;;
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
60 *)
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
61 esac
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
62
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
63 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
64 # Some helper functions
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
65 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
66 check () {
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
67 CMD=$1
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
68
22864
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
69 printf "%s" "checking for ${CMD}... "
24803
11b0ac96885b Remove a space to eliminate a spurious diff between Pidgin's autogen.sh
Richard Laager <rlaager@pidgin.im>
parents: 24559
diff changeset
70 BIN=`which ${CMD} 2>/dev/null`
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
71
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
72 if [ x"${BIN}" = x"" ] ; then
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
73 echo "not found."
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
74 echo "${CMD} is required to build ${PACKAGE}!"
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
75 exit 1;
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
76 fi
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
77
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
78 echo "${BIN}"
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
79 }
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
80
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
81 run_or_die () { # beotch
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
82 CMD=$1
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
83 shift
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
84
23055
3c5b240c60a5 Some versions of mktemp require at least 6 X's in the template
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22992
diff changeset
85 OUTPUT=`mktemp autogen-XXXXXX`
22992
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
86
28778
3d77f81dcf5c Instead of $@, use "$*" in run_or_die or else printf will re-use the format
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 28777
diff changeset
87 printf "running %s %s... " ${CMD} "$*"
22992
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
88 ${CMD} ${@} >${OUTPUT} 2>&1
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
89
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
90 if [ $? != 0 ] ; then
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
91 echo "failed."
22992
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
92 cat ${OUTPUT}
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
93 rm -f ${OUTPUT}
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
94 exit 1
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
95 else
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
96 echo "done."
23071
c199efbb0c02 Remove the stat check that isn't useful and breaks on OS X.
Richard Laager <rlaager@pidgin.im>
parents: 23055
diff changeset
97 cat ${OUTPUT}
22992
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
98
a0d932f2b990 Make error output during autogen actually readable...
Gary Kramlich <grim@reaperworld.com>
parents: 22893
diff changeset
99 rm -f ${OUTPUT}
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
100 fi
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
101 }
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
102
35492
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
103 check_gtkdoc() {
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
104 printf "checking for gtkdocize... "
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
105 GTKDOCIZE=`which gtkdocize 2>/dev/null`
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
106
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
107 if [ x"${GTKDOCIZE}" = x"" ] ; then
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
108 echo "not found."
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
109 echo "EXTRA_DIST =" > gtk-doc.make
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
110 echo "You don't have gtk-doc installed, and thus won't be able to
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
111 generate the documentation.
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
112 "
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
113 else
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
114 echo "${GTKDOCIZE}"
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
115 run_or_die ${GTKDOCIZE} ${GTKDOCIZE_FLAGS}
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
116 fi
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
117 }
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
118
28771
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
119 cleanup () {
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
120 rm -f autogen-??????
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
121 echo
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
122 exit 2
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
123 }
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
124
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
125 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
126 # We really start here, yes, very sneaky!
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
127 ###############################################################################
28771
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
128 trap cleanup 2
a98b5022be89 added a cleanup function to remove our autogen-?????? files when autogen receives SIGINT
Gary Kramlich <grim@reaperworld.com>
parents: 28509
diff changeset
129
22742
ebf85d0ab743 Hush you noisy little script
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22728
diff changeset
130 FIGLET=`which figlet 2> /dev/null`
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
131 if [ x"${FIGLET}" != x"" ] ; then
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
132 ${FIGLET} -f small ${PACKAGE}
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
133 echo "build system is being generated"
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
134 else
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
135 echo "autogenerating build system for '${PACKAGE}'"
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
136 fi
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
137
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
138 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
139 # Look for our args file
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
140 ###############################################################################
22864
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
141 printf "%s" "checking for ${ARGS_FILE}: "
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
142 if [ -f ${ARGS_FILE} ] ; then
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
143 echo "found."
22864
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
144 printf "%s" "sourcing ${ARGS_FILE}: "
24559
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
145 . "`dirname "$0"`"/${ARGS_FILE}
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
146 echo "done."
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
147 else
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
148 echo "not found."
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
149 fi
2162
2a9f076b0af9 [gaim-migrate @ 2172]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents: 2157
diff changeset
150
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
151 ###############################################################################
37508
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
152 # Work inside the source directory
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
153 ##############################################################################
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
154 test -z "$SRCDIR" && SRCDIR=`dirname "$0"`
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
155 test -z "$SRCDIR" && SRCDIR=.
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
156
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
157 OLDDIR=`pwd`
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
158 cd "$SRCDIR"
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
159
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
160 ###############################################################################
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
161 # Check for our required helpers
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
162 ###############################################################################
22864
ccf87155eab2 echo -n is not portable, and OSX has libtoolize installed as glibtoolize
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22767
diff changeset
163 check "$libtoolize"; LIBTOOLIZE=${BIN};
24559
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
164 check "glib-gettextize"; GLIB_GETTEXTIZE=${BIN};
b96d7231b745 - Make autogen.sh find autogen.args when /bin/sh is not bash.
Richard Laager <rlaager@pidgin.im>
parents: 23071
diff changeset
165 check "intltoolize"; INTLTOOLIZE=${BIN};
36874
3560f0bc6eaf Intrgeated gtk-doc with the project
Ankit Vani <a@nevitus.org>
parents: 34326
diff changeset
166 check "sed"; SED=${BIN};
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
167 check "aclocal"; ACLOCAL=${BIN};
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
168 check "autoheader"; AUTOHEADER=${BIN};
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
169 check "automake"; AUTOMAKE=${BIN};
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
170 check "autoconf"; AUTOCONF=${BIN};
3505
77889c7db829 [gaim-migrate @ 3570]
Ethan Blanton <elb@pidgin.im>
parents: 3444
diff changeset
171
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
172 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
173 # Run all of our helpers
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
174 ###############################################################################
22747
85051c6bcc1e I think this syntax is more correct
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22743
diff changeset
175 run_or_die ${LIBTOOLIZE} ${LIBTOOLIZE_FLAGS:-"-c -f --automake"}
85051c6bcc1e I think this syntax is more correct
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22743
diff changeset
176 run_or_die ${GLIB_GETTEXTIZE} ${GLIB_GETTEXTIZE_FLAGS:-"--force --copy"}
85051c6bcc1e I think this syntax is more correct
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22743
diff changeset
177 run_or_die ${INTLTOOLIZE} ${INTLTOOLIZE_FLAGS:-"-c -f --automake"}
28509
345b0febfedb Add a sed line to our autogen.sh script to hopefully avoid ever creating
Mark Doliner <markdoliner@pidgin.im>
parents: 24803
diff changeset
178 # This call to sed is needed to work around an annoying bug in intltool 0.40.6
33955
55aa58076485 Use https URLs for pidgin.im and developer.pidgin.im.
Mark Doliner <mark@kingant.net>
parents: 33651
diff changeset
179 # See https://developer.pidgin.im/ticket/9520 for details
34326
193d8725a3f5 Silence gettext build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33955
diff changeset
180 run_or_die ${SED} -i -e "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" po/Makefile.in.in
193d8725a3f5 Silence gettext build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33955
diff changeset
181 # glib-gettextize doesn't seems to use AM_V_GEN macro
193d8725a3f5 Silence gettext build
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 33955
diff changeset
182 ${SED} -i -e "s:\\tfile=\`echo:\\t@echo -e \" GEN\\\\t\$\@\"; file=\`echo:g" po/Makefile.in.in
22747
85051c6bcc1e I think this syntax is more correct
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22743
diff changeset
183 run_or_die ${ACLOCAL} ${ACLOCAL_FLAGS:-"-I m4macros"}
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
184 run_or_die ${AUTOHEADER} ${AUTOHEADER_FLAGS}
35492
3e187ff386d2 Don't require gtkdocize -- make gtk-doc really optional
Ankit Vani <a@nevitus.org>
parents: 35391
diff changeset
185 check_gtkdoc
22747
85051c6bcc1e I think this syntax is more correct
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22743
diff changeset
186 run_or_die ${AUTOMAKE} ${AUTOMAKE_FLAGS:-"-a -c --gnu"}
22743
f8193b199ff8 Make the new autogen.sh behave more like the old one - run glib-gettextize,
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22742
diff changeset
187 run_or_die ${AUTOCONF} ${AUTOCONF_FLAGS}
1863
af03c531e79c [gaim-migrate @ 1873]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
188
22724
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
189 ###############################################################################
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
190 # Run configure
f76ff81ee882 A more verbose autogen.sh that Gary and I have been using for Guifications
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22331
diff changeset
191 ###############################################################################
37508
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
192 cd "$OLDDIR"
35925
3edc70bf4e09 Emit sending/sent signals when doing /me irc command. Fixes #15750
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 28778
diff changeset
193 if test -z "$NOCONFIGURE"; then
37508
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
194 echo "running $SRCDIR/configure ${CONFIGURE_FLAGS} $@"
78fc5cfbe275 Fixed out of source tree building
James Geboski <jgeboski@gmail.com>
parents: 37144
diff changeset
195 "$SRCDIR/configure" ${CONFIGURE_FLAGS} $@
35925
3edc70bf4e09 Emit sending/sent signals when doing /me irc command. Fixes #15750
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 28778
diff changeset
196 fi

mercurial