source: trunk/third/bonobo-conf/configure.in @ 16762

Revision 16762, 3.8 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16761, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(bonobo-conf/bonobo-config-bag.h)
2
3dnl Needs to be at the top to work around a problem
4dnl in autoconf's use of sed to split the output.
5dnl Some day this can be fixed by xml-i18n-tools.
6AM_PROG_XML_I18N_TOOLS
7
8AM_CONFIG_HEADER(config.h)
9AM_INIT_AUTOMAKE(bonobo-conf, 0.14)
10
11AM_MAINTAINER_MODE
12
13AM_ACLOCAL_INCLUDE(macros)
14GNOME_INIT
15
16AC_ISC_POSIX
17AC_PROG_CC
18AC_PROG_CPP
19AC_STDC_HEADERS
20AC_ARG_PROGRAM
21AM_PROG_LIBTOOL
22AC_PROG_AWK
23
24AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(glib not found or too old),gmodule)
25AM_PATH_OAF(0.6.2,,AC_MSG_ERROR([OAF not found or too old]))
26AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([gtk not found or too old]))
27
28AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
29if test "x$with_html_dir" = "x" ; then
30  HTML_DIR='${datadir}/bonobo-conf/html'
31else
32  HTML_DIR=$with_html_dir
33fi
34AC_SUBST(HTML_DIR)
35
36dnl Check for gconf
37have_gconf=no
38GCONF_LIBS=
39GCONF_CFLAGS=
40AC_MSG_CHECKING(for GConf >= 0.11)
41vers=`gconf-config --version | \
42                awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'`
43if test "$vers" -ge 11; then
44        AC_MSG_RESULT(found)
45        GCONF_LIBS="`gconf-config --libs gconf-gtk`"
46        GCONF_CFLAGS="`gconf-config --cflags gconf-gtk`"
47        have_gconf=yes
48else
49        AC_MSG_RESULT(not found)
50fi
51
52AC_SUBST(GCONF_LIBS)
53AC_SUBST(GCONF_CFLAGS)
54
55AM_CONDITIONAL(ENABLE_GCONF, test x$have_gconf = xyes)
56
57dnl Check for bonobo
58have_bonobo=true
59AC_MSG_CHECKING(for Bonobo >= 1.0.14)
60vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \
61                awk 'BEGIN { FS = "."; } { printf "%d", $1 * 10000 + $2 * 100 + $3;}'`
62if test 0$vers -ge 010014; then
63        AC_MSG_RESULT(found)
64else
65        AC_MSG_ERROR([bonobo >= 1.0.14 not found])
66fi
67
68BONOBO_LIBS="`gnome-config --libs oaf bonobox gnome`"
69BONOBO_CFLAGS="`gnome-config --cflags oaf bonobox gnome`"
70
71BONOBO_CONF_LIBS="-lbonobo_conf $BONOBO_LIBS"
72BONOBO_CONF_CFLAGS="$BONOBO_CFLAGS"
73
74AC_SUBST(BONOBO_CONF_LIBS)
75AC_SUBST(BONOBO_CONF_CFLAGS)
76AC_SUBST(BONOBO_LIBS)
77AC_SUBST(BONOBO_CFLAGS)
78AC_SUBST(LIBS)
79AC_SUBST(CFLAGS)
80
81#######################
82# type alignment test #
83#######################
84
85AC_DEFUN(AC_CHECK_ALIGNOF,
86[changequote(<<, >>)dnl
87dnl The name to #define.
88define(<<AC_TYPE_NAME>>, translit(alignof_$1, [a-z *], [A-Z_P]))dnl
89dnl The cache variable name.
90define(<<AC_CV_NAME>>, translit(ac_cv_alignof_$1, [ *], [_p]))dnl
91changequote([, ])dnl
92AC_MSG_CHECKING(alignment of $1)
93align_save_libs="$LIBS"
94LIBS="$GLIB_LIBS $LIBS"
95align_save_flags="$CFLAGS"
96CFLAGS="`orbit-config --cflags client` $CFLAGS"
97AC_CACHE_VAL(AC_CV_NAME,
98[AC_TRY_RUN([
99#include <stdio.h>
100#include <orb/orbit.h>
101typedef struct {char s1;} CORBA_struct;
102typedef void *CORBA_pointer;
103struct test {char s1; $1 s2;};
104main()
105{
106  FILE *f=fopen("conftestval", "w");
107  if (!f) exit(1);
108  fprintf(f, "%d\n", &(((struct test*)0)->s2));
109  exit(0);
110}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, AC_CV_NAME=0)])dnl
111AC_MSG_RESULT($AC_CV_NAME)
112LIBS="$align_save_libs"
113CFLAGS="$align_save_flags"
114AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
115undefine([AC_TYPE_NAME])dnl
116undefine([AC_CV_NAME])dnl
117])
118
119orig_CPPFLAGS=$CPPFLAGS
120CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
121AC_CHECK_ALIGNOF(CORBA_short)
122AC_CHECK_ALIGNOF(CORBA_long)
123AC_CHECK_ALIGNOF(CORBA_unsigned_short)
124AC_CHECK_ALIGNOF(CORBA_unsigned_long)
125AC_CHECK_ALIGNOF(CORBA_float)
126AC_CHECK_ALIGNOF(CORBA_double)
127AC_CHECK_ALIGNOF(CORBA_char)
128AC_CHECK_ALIGNOF(CORBA_boolean)
129AC_CHECK_ALIGNOF(CORBA_octet)
130AC_CHECK_ALIGNOF(CORBA_long_double)
131AC_CHECK_ALIGNOF(CORBA_wchar)
132AC_CHECK_ALIGNOF(CORBA_long_long)
133AC_CHECK_ALIGNOF(CORBA_unsigned_long_long)
134AC_CHECK_ALIGNOF(CORBA_struct)
135AC_CHECK_ALIGNOF(CORBA_pointer)
136CPPFLAGS=$orig_CPPFLAGS
137
138ALL_LINGUAS="da de es fr it nn no pl sv tr zh_TW"
139
140AM_GNU_GETTEXT
141       
142
143AC_OUTPUT([
144Makefile
145po/Makefile.in
146intl/Makefile
147macros/Makefile
148bonobo-conf/Makefile
149monikers/Makefile
150examples/Makefile
151cedit/Makefile
152idl/Makefile
153doc/Makefile
154tests/Makefile
155bonobo-conf.spec
156])
157
Note: See TracBrowser for help on using the repository browser.