source: trunk/third/oaf/configure.in @ 18115

Revision 18115, 5.3 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18114, 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/oaf.idl)
3
4OAF_MAJOR_VERSION=0
5OAF_MINOR_VERSION=6
6OAF_MICRO_VERSION=10
7OAF_VERSION="$OAF_MAJOR_VERSION.$OAF_MINOR_VERSION.$OAF_MICRO_VERSION"
8AM_INIT_AUTOMAKE(oaf, $OAF_VERSION)
9AC_SUBST(OAF_MAJOR_VERSION)
10AC_SUBST(OAF_MINOR_VERSION)
11AC_SUBST(OAF_MICRO_VERSION)
12
13dnl Specify a header configuration file
14AM_CONFIG_HEADER(config.h)
15
16dnl Initialize maintainer mode
17AM_MAINTAINER_MODE
18
19dnl Initialize libtool
20AM_DISABLE_STATIC
21AM_PROG_LIBTOOL
22
23AM_PROG_XML_I18N_TOOLS
24
25
26dnl Build time sanity check
27AM_SANITY_CHECK
28
29dnl Checks for programs.
30AC_PROG_CC
31AM_PROG_LEX
32AC_PROG_YACC
33AC_PROG_INSTALL
34AC_PROG_LN_S
35AC_PROG_MAKE_SET
36AC_ISC_POSIX
37
38dnl internationalization support
39ALL_LINGUAS="az bg da de el es eu fi fr ga gl hu it ja ko nl nn no pl pt pt_BR ro ru sk sl sv ta tr uk zh_CN zh_TW"
40AM_GNU_OAF_GETTEXT
41
42
43dnl Checks for libraries.
44AM_PATH_GLIB(1.2.0,,
45AC_MSG_ERROR([
46*** GLIB 1.2.0 or better is required. The latest version of GLIB
47*** is always available from ftp://ftp.gtk.org/.]), gmodule)
48
49AM_PATH_ORBIT(0.5.1,,AC_MSG_ERROR([ORBit not installed or installation problem]))
50AC_DEFINE(HAVE_ORB_ORBIT_H)
51
52dnl Check for ORBit > 0.5.1 (CORBA_Object_create_request is prototyped
53dnl in orb/dii.h in the "new" ORBit, but not ORBit 0.5.1, so #defining
54dnl it to nothing results in a compile error iff we have the new ORBit.)
55saved_CFLAGS="$CFLAGS"
56saved_LDFLAGS="$LDFLAGS"
57CFLAGS="$CFLAGS $ORBIT_CFLAGS"
58LDFLAGS="$LDFLAGS $ORBIT_LDFLAGS"
59AC_TRY_COMPILE([
60#define CORBA_Object_create_request
61#include <orb/dii.h>
62],[], AC_MSG_ERROR([You need a newer version of ORBit. See the README.]), :)
63CFLAGS="$saved_CFLAGS"
64LDFLAGS="$saved_LDFLAGS"
65
66APP_LIBS=""
67AC_SUBST(APP_LIBS)
68
69dnl     
70dnl Locate the xml library
71dnl
72AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config)
73if test "$XML_CONFIG" != ""
74then
75  XML_LIBS="`$XML_CONFIG --libs`"
76  XML_CFLAGS="`$XML_CONFIG --cflags`"
77  XML_VERSION="`$XML_CONFIG --version`"
78else
79  AC_MSG_ERROR(Can't find gnome-xml library.)
80fi
81
82case $XML_VERSION in
831.*) ;;
842.*) AC_MSG_ERROR(libxml 2.x detected; OAF requires libxml 1.x) ;;
85*) AC_MSG_ERROR(unrecognized version of libxml detected; OAF requires libxml 1.x) ;;
86esac;
87
88AC_SUBST(XML_LIBS)
89AC_SUBST(XML_CFLAGS)
90
91dnl ======================
92dnl = gtk-doc stuff
93dnl ======================
94
95AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
96AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
97AC_SUBST(HAVE_GTK_DOC)
98
99dnl Let people disable the gtk-doc stuff.
100AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
101
102if test x$enable_gtk_doc = xauto ; then
103  if test x$GTKDOC = xtrue ; then
104    enable_gtk_doc=yes
105  else
106    enable_gtk_doc=no
107  fi
108fi
109dnl NOTE: We need to use a separate automake conditional for this
110dnl       to make this work with the tarballs.
111AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
112
113dnl ======================
114dnl = end gtk-doc stuff
115dnl ======================
116
117
118AC_CHECK_LIB(popt, poptDupArgv,,
119AC_MSG_ERROR([You must have popt 1.5 or newer to compile oaf.]))
120
121dnl Checks for header files.
122AC_HEADER_DIRENT
123AC_HEADER_STDC
124AC_CHECK_HEADERS(fcntl.h unistd.h alloca.h malloc.h)
125
126dnl Checks for typedefs, structures, and compiler characteristics.
127AC_C_CONST
128
129dnl Checks for library functions
130AC_CHECK_FUNCS(select strcspn strdup strtol snprintf usleep nanosleep unsetenv)
131
132dnl declare --enable-* args
133
134oaf_debug_default=no;
135
136AC_ARG_ENABLE(oaf-debug, [  --enable-oaf-debug=[no/yes] turn on debugging [default=$oaf_debug_default]],enable_oaf_debug=$enableval,enable_oaf_debug=$debug_default)
137
138if test "x$enable_oaf_debug" = "xyes"; then
139        AC_DEFINE(OAF_DEBUG)
140fi
141
142dnl turn warnings into errors to enforce clean code
143
144
145
146AC_ARG_ENABLE(more-warnings,
147[  --enable-more-warnings  Maximum compiler warnings],
148set_more_warnings="$enableval",[
149if test -f $srcdir/CVSVERSION; then
150        set_more_warnings=yes
151else
152        set_more_warnings=no
153fi
154])
155
156if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
157        echo "enable compile warnings = $set_more_warnings"
158        CFLAGS="\
159        -Wall \
160        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
161        -Wnested-externs -Wpointer-arith \
162        -Werror \
163        $CFLAGS"
164
165        for option in -Wsign-promo -Wno-sign-compare; do
166                SAVE_CFLAGS="$CFLAGS"
167                CFLAGS="$CFLAGS $option"
168                AC_MSG_CHECKING([whether gcc understands $option])
169                AC_TRY_COMPILE([], [],
170                        has_option=yes,
171                        has_option=no,)
172                CFLAGS="$SAVE_CFLAGS"
173                if test $has_option = yes; then
174                  CFLAGS="$CFLAGS $option"
175                fi
176                AC_MSG_RESULT($has_option)
177                unset has_option
178                unset SAVE_CFLAGS
179        done
180        unset option
181fi
182
183AC_PATH_PROG(PERL_PATH, perl)
184if test -n "$PERL_PATH"; then
185        OAF_SLAY=oaf-slay
186        AC_PATH_PROG(PS_PATH, ps)
187        AC_CACHE_CHECK([for POSIX ps], ac_cv_prog_ps_posix, [
188                USER=${USER:-${LOGNAME:-`logname`}}
189                if $PS_PATH -U $USER -opid,args >/dev/null 2>&1; then
190                        ac_cv_prog_ps_posix=yes
191                else
192                        ac_cv_prog_ps_posix=no
193                fi
194        ])
195        if test "$ac_cv_prog_ps_posix" = yes; then
196                IF_BSD_PS=#
197        else
198                IF_POSIX_PS=#
199        fi
200fi
201AC_SUBST(PERL_PATH)
202AC_SUBST(OAF_SLAY)
203AC_SUBST(PS_PATH)
204AC_SUBST(IF_BSD_PS)
205AC_SUBST(IF_POSIX_PS)
206
207AC_OUTPUT([
208Makefile
209oaf.spec
210idl/Makefile
211docs/Makefile
212api-docs/Makefile
213liboaf/Makefile
214liboaf/liboaf-version.h
215oafd/Makefile
216test/Makefile
217test/oaf-slay
218utils/Makefile
219intl/Makefile
220po/Makefile.in
221oaf-config
222oafConf.sh
223oafd/OAF_naming-service.oaf
224],
225[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
Note: See TracBrowser for help on using the repository browser.