AC_INIT([yelp], [2.9.3], [http://bugzilla.gnome.org/enter_bug.cgi?product=yelp]) AC_CONFIG_SRCDIR(src/yelp-main.c) AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") AC_PROG_INTLTOOL AC_PATH_PROG(GCONFTOOL, gconftool-2) AM_GCONF_SOURCE_2 AC_PROG_CC AC_PROG_CXX AM_PROG_CC_STDC AC_ISC_POSIX AC_HEADER_STDC AM_PROG_LIBTOOL AM_PATH_ORBIT2 AM_PATH_GLIB_2_0 AC_SUBST([AM_CXXFLAGS]) dnl NOTE : it appears that some systems do not like it when you use line dnl continuation charactes to split CFLAGS into readable chunks if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare" fi GETTEXT_PACKAGE=yelp AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext translation domain]) ALL_LINGUAS="af am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kn ko li lt lv mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta tg th tr uk vi wa zh_CN zh_TW zu" AM_GLIB_GNU_GETTEXT AM_GLIB_DEFINE_LOCALEDIR([GNOMELOCALEDIR]) PKG_CHECK_MODULES(YELP, [ gconf-2.0 gnome-doc-utils >= 0.1.1 gnome-vfs-2.0 >= 1.1 gtk+-2.0 >= 2.5.3 libbonobo-2.0 >= 1.108.0 libglade-2.0 >= 2.0.0 libgnome-2.0 >= 2.0.2 libgnomeui-2.0 >= 1.103.0 libxml-2.0 >= 2.6.5 libxslt >= 1.1.4 libexslt >= 0.8.1 ]) YELP_MODULES="gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0" idl_dirs="`$PKG_CONFIG --variable=idldir gnome-vfs-2.0 libgnomeui-2.0 libbonobo-2.0 bonobo-activation-2.0`" AC_PATH_PROGS(SED, gsed sed) YELP_IDL_INCLUDES="`echo ${idl_dirs} | ${SED} -e 's/^/ /' -e 's/ *$//' -e 's/ */ -I /g' -e 's/^ *//'`" AC_SUBST(YELP_IDL_INCLUDES) DB2HTML="`$PKG_CONFIG --variable=db2html gnome-doc-utils`" AC_SUBST(DB2HTML) AC_MSG_CHECKING([which mozilla to use]) AC_ARG_ENABLE([man], [AC_HELP_STRING([--enable-man], [turn on man page support [default=no]])],, enable_man=no) AC_ARG_ENABLE([info], [AC_HELP_STRING([--enable-info], [turn on GNU info support [default=no]])],, enable_info=no) if test "x$enable_man" = "xyes"; then AC_DEFINE(ENABLE_MAN, 1, [turn on man page support]) AM_CONDITIONAL(ENABLE_MAN, true) else AM_CONDITIONAL(ENABLE_MAN, false) fi if test "x$enable_info" = "xyes"; then AC_DEFINE(ENABLE_INFO, 1, [turn on GNU info support]) AM_CONDITIONAL(ENABLE_INFO, true) else AM_CONDITIONAL(ENABLE_INFO, false) fi MOZILLA= AC_ARG_WITH([mozilla], AC_HELP_STRING([--with-mozilla=@<:@mozilla|firefox|thunderbird@:>@], [Whether to use mozilla, firefox or thunderbird gtkmozembed (default: mozilla)]), [MOZILLA="$withval"]) dnl try to autodetect: if mozilla exists, use it, else try firefox, then thunderbird if test "x$MOZILLA" = "x"; then if pkg-config --exists mozilla-gtkmozembed; then MOZILLA=mozilla elif pkg-config --exists firefox-gtkmozembed; then MOZILLA=firefox elif pkg-config --exists thunderbird-gtkmozembed; then MOZILLA=thunderbird else AC_MSG_ERROR([no mozilla installation found]) fi elif test "x$with_mozilla" != "xmozilla" -a "x$with_mozilla" != "xfirefox" -a "x$with_mozilla" != "xthunderbird"; then AC_MSG_ERROR([unknown mozilla name ($MOZILLA)]) fi AC_MSG_RESULT([$MOZILLA]) AC_SUBST(MOZILLA) PKG_CHECK_MODULES(MOZILLA_COMPONENT, $MOZILLA-gtkmozembed) MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA-gtkmozembed`" AC_SUBST(MOZILLA_INCLUDE_ROOT) MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $MOZILLA-gtkmozembed`" AC_SUBST(MOZILLA_HOME) AC_ARG_ENABLE([cpp-rtti], AC_HELP_STRING([--enable-cpp-rtti],[Enable C++ RTTI]),[], [enable_cpp_rtti=no]) if test "x$enable_cpp_rtti" = "xno"; then AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS" fi dnl Check for whereis case $host in *-linux-gnu | *-irix6*) AC_DEFINE(HAVE_MAN_WHEREIS, 1, [man(1) understands -w option]);; *-solaris*) AC_DEFINE(HAVE_MAN_DEBUG, 1, [man(1) has a -d debug option]);; esac dnl =================================================== dnl = Check for popt, reported to be needed on AIX dnl =================================================== AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"], [AC_MSG_ERROR([popt is required to build yelp])]) AC_SUBST(POPT_LIBS) dnl ==================================== dnl = zlib for help converters dnl ==================================== AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required])) dnl ==================================== dnl = Bzip2, for the help converters dnl ==================================== BZ_LIBS= AC_CHECK_LIB(bz2, bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 suppot]) BZ_LIBS="-lbz2"]) dnl <= Check for bzip2 > 1.0.0 AC_CHECK_LIB(bz2, BZ2_bzread, [AC_DEFINE(HAVE_LIBBZ2, 1, [Compile with libbz2 support]) BZ_LIBS="-lbz2" dnl <= define the wrapper-functions to get the Bzip2 stuff working .. => AC_DEFINE(bzread,BZ2_bzread, [Needed to get Bzip2 working]) AC_DEFINE(bzopen,BZ2_bzopen, [Needed to get Bzip2 working]) AC_DEFINE(bzdopen,BZ2_bzdopen, [Needed to get Bzip2 working]) AC_DEFINE(bzwrite,BZ2_bzwrite, [Needed to get Bzip2 working]) AC_DEFINE(bzerror,BZ2_bzerror, [Needed to get Bzip2 working]) AC_DEFINE(bzclose,BZ2_bzclose, [Needed to get Bzip2 working]) AC_DEFINE(bzflush,BZ2_bzflush, [Needed to get Bzip2 working]) AC_DEFINE(bzCompress,BZ2_bzCompress, [Needed to get Bzip2 working]) AC_DEFINE(bzCompressInit,BZ2_bzCompressInit, [Needed to get Bzip2 working]) AC_DEFINE(bzDecompress,BZ2_bzDecompress, [Needed to get Bzip2 working]) AC_DEFINE(bzDecompressInit,BZ2_bzDecompressInit, [Needed to get Bzip2 working]) ]) dnl => AC_SUBST(BZ_LIBS) AC_CONFIG_FILES([ Makefile src/Makefile stylesheets/Makefile stylesheets/db2html.xsl data/Makefile data/icons/Makefile data/ui/Makefile po/Makefile.in ]) AC_OUTPUT([ yelp.desktop.in ])