source: trunk/third/bonobo-activation/configure.in @ 18563

Revision 18563, 6.8 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18562, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(idl/Bonobo_ActivationContext.idl)
3
4BONOBO_ACTIVATION_MAJOR_VERSION=2
5BONOBO_ACTIVATION_MINOR_VERSION=2
6BONOBO_ACTIVATION_MICRO_VERSION=0
7
8BONOBO_ACTIVATION_INTERFACE_AGE=4
9BONOBO_ACTIVATION_BINARY_AGE=0
10BONOBO_ACTIVATION_VERSION="$BONOBO_ACTIVATION_MAJOR_VERSION.$BONOBO_ACTIVATION_MINOR_VERSION.$BONOBO_ACTIVATION_MICRO_VERSION"
11AM_INIT_AUTOMAKE(bonobo-activation, $BONOBO_ACTIVATION_VERSION)
12AC_SUBST(BONOBO_ACTIVATION_MAJOR_VERSION)
13AC_SUBST(BONOBO_ACTIVATION_MINOR_VERSION)
14AC_SUBST(BONOBO_ACTIVATION_MICRO_VERSION)
15AC_SUBST(BONOBO_ACTIVATION_INTERFACE_AGE)
16AC_SUBST(BONOBO_ACTIVATION_BINARY_AGE)
17
18AC_PROG_INTLTOOL
19
20# libtool versioning
21LT_CURRENT=4
22LT_REVISION=0
23LT_AGE=0
24LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
25AC_SUBST(LT_VERSION_INFO)
26AC_SUBST(LT_CURRENT)
27AC_SUBST(LT_REVISION)
28AC_SUBST(LT_AGE)
29
30
31dnl Specify a header configuration file
32AM_CONFIG_HEADER(config.h)
33
34dnl Initialize maintainer mode
35AM_MAINTAINER_MODE
36
37dnl Initialize libtool
38AM_DISABLE_STATIC
39AM_PROG_LIBTOOL
40
41dnl Build time sanity check
42AM_SANITY_CHECK
43
44dnl Checks for programs.
45AC_PROG_CC
46AM_PROG_LEX
47if [[ "$LEX" != "flex" ]]; then
48        AC_MSG_ERROR([flex is required to build bonobo-activation])
49fi
50AC_SUBST(LFLAGS)
51
52AC_PROG_INSTALL
53AC_PROG_LN_S
54AC_PROG_MAKE_SET
55AC_ISC_POSIX
56
57AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc, no)
58if test "x$YACC" = "xno" ; then
59  AC_MSG_ERROR([yacc is required to build bonobo-activation])
60fi
61
62dnl internationalization support
63ALL_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
65GETTEXT_PACKAGE=bonobo-activation
66AC_SUBST(GETTEXT_PACKAGE)
67AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
68
69AM_GLIB_GNU_GETTEXT
70
71dnl Checks for libraries.
72PKG_CHECK_MODULES(BONOBO_ACTIVATION, \
73        gmodule-2.0 >= 2.0.1 \
74        ORBit-2.0 >= 2.4.0 \
75        linc >= 0.5.1)
76AC_SUBST(BONOBO_ACTIVATION_LIBS)
77AC_SUBST(BONOBO_ACTIVATION_CFLAGS)
78
79PKG_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)
84AC_SUBST(SERVER_LIBS)
85AC_SUBST(SERVER_CFLAGS)
86
87PKG_CHECK_MODULES(UTILS, \
88        gmodule-2.0 >= 2.0.1 \
89        ORBit-2.0 >= 2.4.0 \
90        libxml-2.0 >= 2.4.20)
91AC_SUBST(UTILS_LIBS)
92AC_SUBST(UTILS_CFLAGS)
93
94ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
95AC_SUBST(ORBIT_IDL)
96
97 
98dnl **************************
99dnl *** Checks for gtk-doc ***
100dnl **************************
101
102AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
103
104if test "x$with_html_dir" = "x" ; then
105  HTML_DIR='${datadir}/gtk-doc/html'
106else
107  HTML_DIR=$with_html_dir
108fi
109
110AC_SUBST(HTML_DIR)
111
112AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
113
114gtk_doc_min_version=0.6
115if $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
135fi
136
137AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
138AC_SUBST(HAVE_GTK_DOC)
139
140AC_CHECK_PROG(DB2HTML, db2html, true, false)
141AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
142
143dnl Let people disable the gtk-doc stuff.
144AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
145
146if 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
152fi
153
154dnl NOTE: We need to use a separate automake conditional for this
155dnl       to make this work with the tarballs.
156AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
157
158 
159dnl **************************
160dnl *** End checks for gtk-doc ***
161dnl **************************
162
163
164AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
165bonobo-activation. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
166
167dnl Checks for header files.
168AC_HEADER_DIRENT
169AC_HEADER_STDC
170AC_CHECK_HEADERS(fcntl.h unistd.h alloca.h malloc.h locale.h)
171
172dnl Checks for typedefs, structures, and compiler characteristics.
173AC_C_CONST
174
175dnl Checks for library functions
176AC_CHECK_FUNCS(select strcspn strdup strtol snprintf usleep nanosleep unsetenv)
177
178dnl declare --enable-* args
179
180bonobo_activation_debug_default=no;
181
182AC_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
186if test "x$enable_bonobo_activation_debug" = "xyes"; then
187        AC_DEFINE(BONOBO_ACTIVATION_DEBUG)
188fi
189
190dnl turn warnings into errors to enforce clean code
191
192
193AC_ARG_ENABLE(more-warnings,
194[  --enable-more-warnings  Maximum compiler warnings],
195set_more_warnings="$enableval",[
196if test -f $srcdir/CVSVERSION; then
197        set_more_warnings=yes
198else
199        set_more_warnings=no
200fi
201])
202
203if 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
228fi
229
230AC_PATH_PROG(PERL_PATH, perl)
231if 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
247fi
248AC_SUBST(PERL_PATH)
249AC_SUBST(BONOBO_SLAY)
250AC_SUBST(PS_PATH)
251AC_SUBST(IF_BSD_PS)
252AC_SUBST(IF_POSIX_PS)
253
254
255AC_OUTPUT([
256Makefile
257bonobo-activation.spec
258idl/Makefile
259docs/Makefile
260api-docs/Makefile
261bonobo-activation/Makefile
262bonobo-activation/bonobo-activation-version.h
263server/Makefile
264test/Makefile
265utils/Makefile
266utils/bonobo-slay
267po/Makefile.in
268bonobo-activation-2.0.pc
269])
270
271echo "
272bonobo-activation-$BONOBO_ACTIVATION_VERSION
273
274configuration:
275
276        prefix:                 ${prefix}
277        source code location:   ${srcdir}
278        compiler:               ${CC}
279        yacc:                   ${YACC}
280"
Note: See TracBrowser for help on using the repository browser.