1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(idl/Bonobo_ActivationContext.idl) |
---|
3 | |
---|
4 | BONOBO_ACTIVATION_MAJOR_VERSION=2 |
---|
5 | BONOBO_ACTIVATION_MINOR_VERSION=2 |
---|
6 | BONOBO_ACTIVATION_MICRO_VERSION=0 |
---|
7 | |
---|
8 | BONOBO_ACTIVATION_INTERFACE_AGE=4 |
---|
9 | BONOBO_ACTIVATION_BINARY_AGE=0 |
---|
10 | BONOBO_ACTIVATION_VERSION="$BONOBO_ACTIVATION_MAJOR_VERSION.$BONOBO_ACTIVATION_MINOR_VERSION.$BONOBO_ACTIVATION_MICRO_VERSION" |
---|
11 | AM_INIT_AUTOMAKE(bonobo-activation, $BONOBO_ACTIVATION_VERSION) |
---|
12 | AC_SUBST(BONOBO_ACTIVATION_MAJOR_VERSION) |
---|
13 | AC_SUBST(BONOBO_ACTIVATION_MINOR_VERSION) |
---|
14 | AC_SUBST(BONOBO_ACTIVATION_MICRO_VERSION) |
---|
15 | AC_SUBST(BONOBO_ACTIVATION_INTERFACE_AGE) |
---|
16 | AC_SUBST(BONOBO_ACTIVATION_BINARY_AGE) |
---|
17 | |
---|
18 | AC_PROG_INTLTOOL |
---|
19 | |
---|
20 | # libtool versioning |
---|
21 | LT_CURRENT=4 |
---|
22 | LT_REVISION=0 |
---|
23 | LT_AGE=0 |
---|
24 | LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}' |
---|
25 | AC_SUBST(LT_VERSION_INFO) |
---|
26 | AC_SUBST(LT_CURRENT) |
---|
27 | AC_SUBST(LT_REVISION) |
---|
28 | AC_SUBST(LT_AGE) |
---|
29 | |
---|
30 | |
---|
31 | dnl Specify a header configuration file |
---|
32 | AM_CONFIG_HEADER(config.h) |
---|
33 | |
---|
34 | dnl Initialize maintainer mode |
---|
35 | AM_MAINTAINER_MODE |
---|
36 | |
---|
37 | dnl Initialize libtool |
---|
38 | AM_DISABLE_STATIC |
---|
39 | AM_PROG_LIBTOOL |
---|
40 | |
---|
41 | dnl Build time sanity check |
---|
42 | AM_SANITY_CHECK |
---|
43 | |
---|
44 | dnl Checks for programs. |
---|
45 | AC_PROG_CC |
---|
46 | AM_PROG_LEX |
---|
47 | if [[ "$LEX" != "flex" ]]; then |
---|
48 | AC_MSG_ERROR([flex is required to build bonobo-activation]) |
---|
49 | fi |
---|
50 | AC_SUBST(LFLAGS) |
---|
51 | |
---|
52 | AC_PROG_INSTALL |
---|
53 | AC_PROG_LN_S |
---|
54 | AC_PROG_MAKE_SET |
---|
55 | AC_ISC_POSIX |
---|
56 | |
---|
57 | AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, no) |
---|
58 | if test "x$YACC" = "xno" ; then |
---|
59 | AC_MSG_ERROR([yacc is required to build bonobo-activation]) |
---|
60 | fi |
---|
61 | |
---|
62 | dnl internationalization support |
---|
63 | ALL_LINGUAS="am ar az be bg ca cs da de el es fa fi fr ga gl he hi hu it ja ko lv mk ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi wa zh_CN zh_TW" |
---|
64 | |
---|
65 | GETTEXT_PACKAGE=bonobo-activation |
---|
66 | AC_SUBST(GETTEXT_PACKAGE) |
---|
67 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE") |
---|
68 | |
---|
69 | AM_GLIB_GNU_GETTEXT |
---|
70 | |
---|
71 | dnl Checks for libraries. |
---|
72 | PKG_CHECK_MODULES(BONOBO_ACTIVATION, \ |
---|
73 | gmodule-2.0 >= 2.0.1 \ |
---|
74 | ORBit-2.0 >= 2.4.0 \ |
---|
75 | linc >= 0.5.1) |
---|
76 | AC_SUBST(BONOBO_ACTIVATION_LIBS) |
---|
77 | AC_SUBST(BONOBO_ACTIVATION_CFLAGS) |
---|
78 | |
---|
79 | PKG_CHECK_MODULES(SERVER, \ |
---|
80 | gmodule-2.0 >= 2.0.1 \ |
---|
81 | ORBit-2.0 >= 2.4.0 \ |
---|
82 | ORBit-CosNaming-2.0 >= 2.4.0 \ |
---|
83 | libxml-2.0 >= 2.4.20) |
---|
84 | AC_SUBST(SERVER_LIBS) |
---|
85 | AC_SUBST(SERVER_CFLAGS) |
---|
86 | |
---|
87 | PKG_CHECK_MODULES(UTILS, \ |
---|
88 | gmodule-2.0 >= 2.0.1 \ |
---|
89 | ORBit-2.0 >= 2.4.0 \ |
---|
90 | libxml-2.0 >= 2.4.20) |
---|
91 | AC_SUBST(UTILS_LIBS) |
---|
92 | AC_SUBST(UTILS_CFLAGS) |
---|
93 | |
---|
94 | ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`" |
---|
95 | AC_SUBST(ORBIT_IDL) |
---|
96 | |
---|
97 | |
---|
98 | dnl ************************** |
---|
99 | dnl *** Checks for gtk-doc *** |
---|
100 | dnl ************************** |
---|
101 | |
---|
102 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
103 | |
---|
104 | if test "x$with_html_dir" = "x" ; then |
---|
105 | HTML_DIR='${datadir}/gtk-doc/html' |
---|
106 | else |
---|
107 | HTML_DIR=$with_html_dir |
---|
108 | fi |
---|
109 | |
---|
110 | AC_SUBST(HTML_DIR) |
---|
111 | |
---|
112 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
113 | |
---|
114 | gtk_doc_min_version=0.6 |
---|
115 | if $GTKDOC ; then |
---|
116 | gtk_doc_version=`gtkdoc-mkdb --version` |
---|
117 | AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) |
---|
118 | |
---|
119 | IFS="${IFS= }"; bonobo_activation_save_IFS="$IFS"; IFS="." |
---|
120 | set $gtk_doc_version |
---|
121 | for min in $gtk_doc_min_version ; do |
---|
122 | cur=$1; shift |
---|
123 | if test -z $min ; then break; fi |
---|
124 | if test -z $cur ; then GTKDOC=false; break; fi |
---|
125 | if test $cur -gt $min ; then break ; fi |
---|
126 | if test $cur -lt $min ; then GTKDOC=false; break ; fi |
---|
127 | done |
---|
128 | IFS="$bonobo_activation_save_IFS" |
---|
129 | |
---|
130 | if $GTKDOC ; then |
---|
131 | AC_MSG_RESULT(yes) |
---|
132 | else |
---|
133 | AC_MSG_RESULT(no) |
---|
134 | fi |
---|
135 | fi |
---|
136 | |
---|
137 | AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) |
---|
138 | AC_SUBST(HAVE_GTK_DOC) |
---|
139 | |
---|
140 | AC_CHECK_PROG(DB2HTML, db2html, true, false) |
---|
141 | AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) |
---|
142 | |
---|
143 | dnl Let people disable the gtk-doc stuff. |
---|
144 | AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) |
---|
145 | |
---|
146 | if test x$enable_gtk_doc = xauto ; then |
---|
147 | if test x$GTKDOC = xtrue ; then |
---|
148 | enable_gtk_doc=yes |
---|
149 | else |
---|
150 | enable_gtk_doc=no |
---|
151 | fi |
---|
152 | fi |
---|
153 | |
---|
154 | dnl NOTE: We need to use a separate automake conditional for this |
---|
155 | dnl to make this work with the tarballs. |
---|
156 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
157 | |
---|
158 | |
---|
159 | dnl ************************** |
---|
160 | dnl *** End checks for gtk-doc *** |
---|
161 | dnl ************************** |
---|
162 | |
---|
163 | |
---|
164 | AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build |
---|
165 | bonobo-activation. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) |
---|
166 | |
---|
167 | dnl Checks for header files. |
---|
168 | AC_HEADER_DIRENT |
---|
169 | AC_HEADER_STDC |
---|
170 | AC_CHECK_HEADERS(fcntl.h unistd.h alloca.h malloc.h locale.h) |
---|
171 | |
---|
172 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
173 | AC_C_CONST |
---|
174 | |
---|
175 | dnl Checks for library functions |
---|
176 | AC_CHECK_FUNCS(select strcspn strdup strtol snprintf usleep nanosleep unsetenv) |
---|
177 | |
---|
178 | dnl declare --enable-* args |
---|
179 | |
---|
180 | bonobo_activation_debug_default=no; |
---|
181 | |
---|
182 | AC_ARG_ENABLE(bonobo-activation-debug, [ |
---|
183 | --enable-bonobo-activation-debug=[no/yes] turn on debugging [default=$bonobo_activation_debug_default] |
---|
184 | ],enable_bonobo_activation_debug=$enableval,enable_bonobo_activation_debug=$debug_default) |
---|
185 | |
---|
186 | if test "x$enable_bonobo_activation_debug" = "xyes"; then |
---|
187 | AC_DEFINE(BONOBO_ACTIVATION_DEBUG) |
---|
188 | fi |
---|
189 | |
---|
190 | dnl turn warnings into errors to enforce clean code |
---|
191 | |
---|
192 | |
---|
193 | AC_ARG_ENABLE(more-warnings, |
---|
194 | [ --enable-more-warnings Maximum compiler warnings], |
---|
195 | set_more_warnings="$enableval",[ |
---|
196 | if test -f $srcdir/CVSVERSION; then |
---|
197 | set_more_warnings=yes |
---|
198 | else |
---|
199 | set_more_warnings=no |
---|
200 | fi |
---|
201 | ]) |
---|
202 | |
---|
203 | if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then |
---|
204 | echo "enable compile warnings = $set_more_warnings" |
---|
205 | CFLAGS="\ |
---|
206 | -Wall \ |
---|
207 | -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ |
---|
208 | -Wnested-externs -Wpointer-arith \ |
---|
209 | -Wno-unused \ |
---|
210 | $CFLAGS" |
---|
211 | |
---|
212 | for option in -Wsign-promo -Wno-sign-compare; do |
---|
213 | SAVE_CFLAGS="$CFLAGS" |
---|
214 | CFLAGS="$CFLAGS $option" |
---|
215 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
216 | AC_TRY_COMPILE([], [], |
---|
217 | has_option=yes, |
---|
218 | has_option=no,) |
---|
219 | CFLAGS="$SAVE_CFLAGS" |
---|
220 | if test $has_option = yes; then |
---|
221 | CFLAGS="$CFLAGS $option" |
---|
222 | fi |
---|
223 | AC_MSG_RESULT($has_option) |
---|
224 | unset has_option |
---|
225 | unset SAVE_CFLAGS |
---|
226 | done |
---|
227 | unset option |
---|
228 | fi |
---|
229 | |
---|
230 | AC_PATH_PROG(PERL_PATH, perl) |
---|
231 | if test -n "$PERL_PATH"; then |
---|
232 | BONOBO_SLAY=bonobo-slay |
---|
233 | AC_PATH_PROG(PS_PATH, ps) |
---|
234 | AC_CACHE_CHECK([for POSIX ps], ac_cv_prog_ps_posix, [ |
---|
235 | USER=${USER:-${LOGNAME:-`logname`}} |
---|
236 | if $PS_PATH -U $USER -opid,args >/dev/null 2>&1; then |
---|
237 | ac_cv_prog_ps_posix=yes |
---|
238 | else |
---|
239 | ac_cv_prog_ps_posix=no |
---|
240 | fi |
---|
241 | ]) |
---|
242 | if test "$ac_cv_prog_ps_posix" = yes; then |
---|
243 | IF_BSD_PS=# |
---|
244 | else |
---|
245 | IF_POSIX_PS=# |
---|
246 | fi |
---|
247 | fi |
---|
248 | AC_SUBST(PERL_PATH) |
---|
249 | AC_SUBST(BONOBO_SLAY) |
---|
250 | AC_SUBST(PS_PATH) |
---|
251 | AC_SUBST(IF_BSD_PS) |
---|
252 | AC_SUBST(IF_POSIX_PS) |
---|
253 | |
---|
254 | |
---|
255 | AC_OUTPUT([ |
---|
256 | Makefile |
---|
257 | bonobo-activation.spec |
---|
258 | idl/Makefile |
---|
259 | docs/Makefile |
---|
260 | api-docs/Makefile |
---|
261 | bonobo-activation/Makefile |
---|
262 | bonobo-activation/bonobo-activation-version.h |
---|
263 | server/Makefile |
---|
264 | test/Makefile |
---|
265 | utils/Makefile |
---|
266 | utils/bonobo-slay |
---|
267 | po/Makefile.in |
---|
268 | bonobo-activation-2.0.pc |
---|
269 | ]) |
---|
270 | |
---|
271 | echo " |
---|
272 | bonobo-activation-$BONOBO_ACTIVATION_VERSION |
---|
273 | |
---|
274 | configuration: |
---|
275 | |
---|
276 | prefix: ${prefix} |
---|
277 | source code location: ${srcdir} |
---|
278 | compiler: ${CC} |
---|
279 | yacc: ${YACC} |
---|
280 | " |
---|