dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([MyRuLib],[0.26.1],[mail@lintest.ru],[myrulib],[http://myrulib.lintest.ru/]) AC_CONFIG_SRCDIR([MyRuLib/MyRuLibApp.cpp]) AC_CONFIG_SRCDIR([autoconf_inc.m4]) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl Checks for programs. AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_CC AC_PROG_CXX AC_PROG_CXXCPP dnl AC_PROG_INTLTOOL dnl AM_GNU_GETTEXT AM_OPTIONS_WXCONFIG AM_PATH_WXCONFIG(2.8.10, WXFOUND=1, WXFOUND=0, [aui,adv,html,core,net], [--unicode=yes]) if test "$WXFOUND" != 1; then AC_MSG_ERROR([ Please check that wx-config is in path, the directory where wxWindows libraries are installed (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH or equivalent variable and wxWindows is version 2.8.10 or above. ]) fi AC_MSG_CHECKING([for --with-expat]) AC_ARG_WITH([expat], [AS_HELP_STRING([--with-expat], [Use builtin Expat library])], USE_EXPAT="$withval", USE_EXPAT="no") AC_MSG_RESULT([$USE_EXPAT]) if test $USE_EXPAT = no ; then AC_CHECK_HEADER(expat.h,AC_CHECK_LIB(expat,XML_StopParser,USE_EXPAT="no",USE_EXPAT="yes"),USE_EXPAT="yes") fi AC_MSG_CHECKING([for --with-sqlite]) AC_ARG_WITH([sqlite], [AS_HELP_STRING([--with-sqlite], [Use builtin SQLite3 library])], USE_SQLITE="$withval", USE_SQLITE="no") AC_MSG_RESULT([$USE_SQLITE]) if test $USE_SQLITE = no ; then AC_CHECK_HEADER(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open,USE_SQLITE="no",USE_SQLITE="yes"),USE_SQLITE="yes") fi AC_MSG_CHECKING([for --with-locale]) AC_ARG_WITH([locale], [AS_HELP_STRING([--with-locale], [Include locale files into executable])], USE_LOCALE="$withval", USE_LOCALE="no") AC_MSG_RESULT([$USE_LOCALE]) AC_MSG_CHECKING([for --with-strip]) AC_ARG_WITH([strip], [AS_HELP_STRING([--with-strip], [Discard debug symbols from the executable file.])], USE_STRIP="$withval", USE_STRIP="yes") AC_MSG_RESULT([$USE_STRIP]) AC_BAKEFILE([m4_include(autoconf_inc.m4)]) dnl NB: After the wxMSW configuration use the following command. dnl $ sed -i 's/-mthreads//g' Makefile" DOLLAR="$" WX_CFLAGS=`echo $WX_CFLAGS | sed "s|-mthreads||g"` WX_CXXFLAGS=`echo $WX_CXXFLAGS | sed "s|-mthreads||g"` WX_CPPFLAGS=`echo $WX_CPPFLAGS | sed "s|-mthreads||g"` WX_LIBS=`echo $WX_LIBS | sed "s|-mthreads||g"` LDFLAGS="$LDFLAGS -Wl,--add-needed" if test $USE_EXPAT = yes ; then CXXFLAGS="$CXXFLAGS -DXML_STATIC -I$DOLLAR(srcdir)/sources/Expat" WX_LIBS="-lexpat_static $WX_LIBS" else LIBS="$LIBS -lexpat" fi if test $USE_SQLITE = yes ; then CXXFLAGS="$CXXFLAGS -I$DOLLAR(srcdir)/sources/SQLite3" WX_LIBS="-lsqlite3_static $WX_LIBS" else LIBS="$LIBS -lsqlite3" fi if test $USE_LOCALE = yes ; then CXXFLAGS="$CXXFLAGS -DFB_INCLUDE_LOCALE" fi if test $USE_STRIP = yes ; then STRIP_COMMAND="$DOLLAR(STRIP) ./myrulib$DOLLAR(EXEEXT)" else STRIP_COMMAND="" fi AC_SUBST(STRIP_COMMAND) AC_CONFIG_FILES([Makefile]) if test "x$WX_LIBS_STATIC" = "x"; then USE_WX_STATIC=no else USE_WX_STATIC=yes fi dnl report how we have been configured echo echo "Configured MyRuLib AC_PACKAGE_VERSION for \`${host}' wxWidgets ${WX_VERSION}" echo echo " Use buildin Expat library? ${USE_EXPAT}" echo " Use buildin SQLite3 library? ${USE_SQLITE}" echo " Include locale files into executable? ${USE_LOCALE}" echo " Strip the executable file? ${USE_STRIP}" echo " Link wxWidgets as a static library? ${USE_WX_STATIC}" echo AC_OUTPUT