AC_INIT(bonobo-conf/bonobo-config-bag.h) dnl Needs to be at the top to work around a problem dnl in autoconf's use of sed to split the output. dnl Some day this can be fixed by xml-i18n-tools. AM_PROG_XML_I18N_TOOLS AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(bonobo-conf, 0.16) AM_MAINTAINER_MODE AM_ACLOCAL_INCLUDE(macros) GNOME_INIT AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL AC_PROG_AWK AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(glib not found or too old),gmodule) AM_PATH_OAF(0.6.2,,AC_MSG_ERROR([OAF not found or too old])) AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([gtk not found or too old])) AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/bonobo-conf/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) dnl Check for gconf have_gconf=no GCONF_LIBS= GCONF_CFLAGS= AC_MSG_CHECKING(for GConf >= 0.11) vers=`gconf-config --version | \ awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'` if test "$vers" -ge 11; then AC_MSG_RESULT(found) GCONF_LIBS="`gconf-config --libs gconf-gtk`" GCONF_CFLAGS="`gconf-config --cflags gconf-gtk`" have_gconf=yes else AC_MSG_RESULT(not found) fi AC_SUBST(GCONF_LIBS) AC_SUBST(GCONF_CFLAGS) AM_CONDITIONAL(ENABLE_GCONF, test x$have_gconf = xyes) dnl Check for bonobo have_bonobo=true AC_MSG_CHECKING(for Bonobo >= 1.0.14) vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \ awk 'BEGIN { FS = "."; } { printf "%d", $1 * 10000 + $2 * 100 + $3;}'` if test 0$vers -ge 010014; then AC_MSG_RESULT(found) else AC_MSG_ERROR([bonobo >= 1.0.14 not found]) fi BONOBO_LIBS="`gnome-config --libs oaf bonobox gnome`" BONOBO_CFLAGS="`gnome-config --cflags oaf bonobox gnome`" BONOBO_CONF_LIBS="-lbonobo_conf $BONOBO_LIBS" BONOBO_CONF_CFLAGS="$BONOBO_CFLAGS" AC_SUBST(BONOBO_CONF_LIBS) AC_SUBST(BONOBO_CONF_CFLAGS) AC_SUBST(BONOBO_LIBS) AC_SUBST(BONOBO_CFLAGS) AC_SUBST(LIBS) AC_SUBST(CFLAGS) ####################### # type alignment test # ####################### AC_DEFUN(AC_CHECK_ALIGNOF, [changequote(<<, >>)dnl dnl The name to #define. define(<>, translit(alignof_$1, [a-z *], [A-Z_P]))dnl dnl The cache variable name. define(<>, translit(ac_cv_alignof_$1, [ *], [_p]))dnl changequote([, ])dnl AC_MSG_CHECKING(alignment of $1) align_save_libs="$LIBS" LIBS="$GLIB_LIBS $LIBS" align_save_flags="$CFLAGS" CFLAGS="`orbit-config --cflags client` $CFLAGS" AC_CACHE_VAL(AC_CV_NAME, [AC_TRY_RUN([ #include #include typedef struct {char s1;} CORBA_struct; typedef void *CORBA_pointer; struct test {char s1; $1 s2;}; main() { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", &(((struct test*)0)->s2)); exit(0); }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, AC_CV_NAME=0)])dnl AC_MSG_RESULT($AC_CV_NAME) LIBS="$align_save_libs" CFLAGS="$align_save_flags" AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) undefine([AC_TYPE_NAME])dnl undefine([AC_CV_NAME])dnl ]) orig_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS" AC_CHECK_ALIGNOF(CORBA_short) AC_CHECK_ALIGNOF(CORBA_long) AC_CHECK_ALIGNOF(CORBA_unsigned_short) AC_CHECK_ALIGNOF(CORBA_unsigned_long) AC_CHECK_ALIGNOF(CORBA_float) AC_CHECK_ALIGNOF(CORBA_double) AC_CHECK_ALIGNOF(CORBA_char) AC_CHECK_ALIGNOF(CORBA_boolean) AC_CHECK_ALIGNOF(CORBA_octet) AC_CHECK_ALIGNOF(CORBA_long_double) AC_CHECK_ALIGNOF(CORBA_wchar) AC_CHECK_ALIGNOF(CORBA_long_long) AC_CHECK_ALIGNOF(CORBA_unsigned_long_long) AC_CHECK_ALIGNOF(CORBA_struct) AC_CHECK_ALIGNOF(CORBA_pointer) CPPFLAGS=$orig_CPPFLAGS ALL_LINGUAS="az da de el es fr hu it nn no pl pt pt_BR sk sv tr zh_TW" AM_GNU_GETTEXT AC_OUTPUT([ Makefile po/Makefile.in intl/Makefile macros/Makefile bonobo-conf/Makefile monikers/Makefile examples/Makefile cedit/Makefile idl/Makefile doc/Makefile tests/Makefile bonobo-conf.spec ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])