+AFMINSTALL=
+
+if test "$wxUSE_GUI" = "yes"; then
+
+USE_GUI=1
+
+TOOLKIT=
+TOOLKIT_INCLUDE=
+
+GUIOBJS=
+COMMONOBJS=
+GENERICOBJS=
+
+GUI_TK_LIBRARY=
+GUI_TK_LINK=
+
+WXGTK12=
+WXGTK127=
+WXGTK20=
+
+WXWINE=
+
+if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
+ if test "$cross_compiling" = "yes" ; then
+ dnl mingw32 will find them even if they're not in one of standard paths
+ AC_MSG_WARN(skipping windows.h check for cross-compilation)
+ else
+ AC_MSG_CHECKING(for Windows headers)
+ WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
+ if test "$ac_find_includes" != "" ; then
+ AC_MSG_RESULT(found $ac_find_includes)
+ TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes"
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+ fi
+ fi
+
+ INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw"
+ dnl --- Quick & Dirty ; link against most/all libraries
+ dnl --- This will bloat the executable, but it'll work for now...
+ LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32"
+
+ dnl add extra odbc libs if we have compiled in odbc
+ if test "$wxUSE_ODBC" = "yes" ; then
+ LIBS="$LIBS -lodbc32 -lole32 -loleaut32"
+ fi
+
+ dnl -mwindows is needed to avoid that spawning of a console window
+ if test "$wxUSE_MINGW" = 1; then
+ LDFLAGS="$LDFLAGS -mwindows"
+ fi
+
+ TOOLKIT=MSW
+
+ GUIOBJS="\$(MSW_GUIOBJS)"
+ GUIHEADERS="\$(MSW_HEADERS)"
+ COMMONOBJS="\$(MSW_COMMONOBJS)"
+ GENERICOBJS="\$(MSW_GENERICOBJS)"
+ UNIXOBJS=
+ GUIDIST=MSW_DIST
+
+ dnl we should calculate these
+ RCINCSWITCH="--include-dir"
+ RCDEFSWITCH="--define"
+ RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\""
+ RCINPUTSWITCH="-i"
+ RCOUTPUTSWITCH="-o"
+ RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__"
+
+ dnl set optinal RES_PROGRAM_OPT to RES_PROGRAM
+ RESPROGRAM="\$(RES_PROGRAM)"
+
+fi
+
+if test "$wxUSE_GTK" = 1; then
+ dnl avoid calling AM_PATH_GTK twice, so check first for the newer version
+ dnl and only then, if it wasn't found, for an older one
+ AM_PATH_GTK_2_0(1.3.1, WXGTK20=1,[
+ AM_PATH_GTK(1.2.7, WXGTK127=1)
+ AM_PATH_GTK(1.2.3, WXGTK12=1)
+ ], gthread)
+
+ if test "$WXGTK12" != 1 -a "$WXGTK20" != 1; then
+ AC_MSG_ERROR([
+ Please check that gtk-config is in path, the directory
+ where GTK+ libraries are installed (returned by
+ 'gtk-config --libs' command) is in LD_LIBRARY_PATH or
+ equivalent variable and GTK+ is version 1.2.3 or above.
+ ])
+ fi
+
+ TOOLKIT_INCLUDE="$GTK_CFLAGS"
+
+dnl Appending gthreads as it was done here is not portable, instead
+dnl we now call "gtk-config --libs gthread" which sets the right library
+dnl name for us. The following hacks are no longer required.
+
+ GUI_TK_LIBRARY="$GTK_LIBS"
+
+dnl dnl On FreeBSD, the libs are called gtk12 etc, so we must append gthread12
+dnl echo $GTK_LIBS | fgrep -q "glib12"
+dnl if test $? = 0 ; then
+dnl GUI_TK_LIBRARY="$GTK_LIBS -gthread12"
+dnl else
+dnl GUI_TK_LIBRARY="$GTK_LIBS -lgthread"
+dnl fi
+ TOOLKIT=GTK
+
+ AFMINSTALL=afminstall
+
+ GUIOBJS="\$(GTK_GUIOBJS)"
+ GUIHEADERS="\$(GTK_HEADERS)"
+ COMMONOBJS="\$(GTK_COMMONOBJS)"
+ GENERICOBJS="\$(GTK_GENERICOBJS)"
+ GUIDEPS="\$(GTK_GUIDEPS)"
+ COMMONDEPS="\$(GTK_COMMONDEPS)"
+ GENERICDEPS="\$(GTK_GENERICDEPS)"
+ UNIXOBJS="\$(UNIX_OBJS)"
+ UNIXDEPS="\$(UNIX_DEPS)"
+ GUIDIST=GTK_DIST
+
+ dnl test for XIM support in libgdk
+ AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
+fi
+
+if test "$wxUSE_WINE" = 1; then
+ AC_MSG_CHECKING(for WINE includes)
+ WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
+ if test "$ac_find_includes" != "" ; then
+ AC_MSG_RESULT(found $ac_find_includes)
+ TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes"
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+ fi
+
+ XPM_LINK=""
+ AC_MSG_CHECKING(for Xpm library)
+ WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
+ if test "$ac_find_libraries" != "" ; then
+ GUI_TK_LIBRARY="-L$ac_find_libraries"
+ XPM_LINK="-lXpm"
+ AC_DEFINE(wxHAVE_LIB_XPM)
+ AC_MSG_RESULT(found at $ac_find_libraries)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(library will be compiled without support for images in XPM format)
+ fi
+
+ MESA_LINK=""
+ AC_MSG_CHECKING(for Mesa library)
+ WX_PATH_FIND_LIBRARIES($SEARCH_LIB,MesaGL)
+ if test "$ac_find_libraries" != "" ; then
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -L$ac_find_libraries"
+ MESA_LINK="-lMesaGL"
+ AC_MSG_RESULT(found at $ac_find_libraries)
+ else
+ AC_MSG_ERROR(no)
+ fi
+
+ GUI_TK_LINK="-lwine $MESA_LINK $XPM_LINK -lXxf86dga -lXxf86vm -lSM -lICE -lXext -lXmu -lX11 -lncurses"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
+ WXWINE=1
+ TOOLKIT=MSW
+
+ GUIHEADERS="\$(MSW_HEADERS)"
+ GUIOBJS="\$(MSW_GUIOBJS)"
+ COMMONOBJS="\$(MSW_COMMONOBJS)"
+ GENERICOBJS="\$(MSW_GENERICOBJS)"
+ GUIDEPS="\$(MSW_GUIDEPS)"
+ COMMONDEPS="\$(MSW_COMMONDEPS)"
+ GENERICDEPS="\$(MSW_GENERICDEPS)"
+ UNIXOBJS="\$(UNIX_OBJS)"
+ UNIXDEPS="\$(UNIX_DEPS)"
+ GUIDIST=MSW_DIST
+fi
+
+dnl use standard macros to check for X headers/libs, this brings support
+dnl for the standard configure options --x-includes and --x-libraries;
+dnl the path to the X headers/libs is not only needed for motif, but also
+dnl by the OpenGL and XKBlib.h checks further down
+
+AC_PATH_XTRA
+CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+LDFLAGS="$LDFLAGS $X_LIBS"
+
+if test "$wxUSE_MOTIF" = 1; then
+ if test "$no_x" = "yes"; then
+ AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options)
+ fi
+
+ GUI_TK_LIBRARY="$X_LIBS"
+ TOOLKIT_INCLUDE="$X_CFLAGS"
+
+ AFMINSTALL=afminstall
+
+ dnl manual check for X11 headers/libs
+ dnl
+ dnl AC_MSG_CHECKING(for X11 headers)
+ dnl WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h)
+ dnl if test "$ac_find_includes" != "" ; then
+ dnl AC_MSG_RESULT(found $ac_find_includes)
+ dnl else
+ dnl AC_MSG_RESULT(no)
+ dnl AC_MSG_ERROR(please set CFLAGS to contain the location of X11/Intrinsic.h)
+ dnl fi
+ dnl
+ dnl AC_MSG_CHECKING(for X11 libraries)
+ dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB, X11)
+ dnl if test "$ac_find_libraries" != "" ; then
+ dnl WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
+ dnl WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
+ dnl
+ dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
+ dnl TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include"
+ dnl AC_MSG_RESULT(found at $ac_find_libraries)
+ dnl else
+ dnl AC_MSG_RESULT(no)
+ dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libX11)
+ dnl fi
+
+ COMPILED_X_PROGRAM=0
+
+ AC_MSG_CHECKING(for Motif/Lesstif headers)
+ WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
+ if test "$ac_find_includes" != "" ; then
+ AC_MSG_RESULT(found $ac_find_includes)
+ else
+ AC_TRY_COMPILE(
+ [
+ #include <Xm/Xm.h>
+ ],
+ [
+ int version;
+
+ version = xmUseVersion;
+ ],
+ [
+ AC_MSG_RESULT(found in default search path)
+ COMPILED_X_PROGRAM=1
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h)
+ ]
+ )
+ fi
+
+ if test "$COMPILED_X_PROGRAM" = 0; then
+ AC_MSG_CHECKING(for Motif/Lesstif library)
+ WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm)
+ if test "$ac_find_libraries" != "" ; then
+ WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
+ WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
+
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
+ TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include"
+ AC_MSG_RESULT(found at $ac_find_libraries)
+ else
+ dnl it might happen that we found headers in one of the standard
+ dnl paths but the libs are elsewhere - we do need to try to
+ dnl compile a sample program then here
+ AC_TRY_COMPILE(
+ [
+ #include <Xm/Xm.h>
+ ],
+ [
+ int version;
+
+ version = xmUseVersion;
+ ],
+ [
+ AC_MSG_RESULT(found in default search path)
+ COMPILED_X_PROGRAM=1
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
+ ]
+ )
+ fi
+ fi
+
+ dnl we don't need this as we used AC_PATH_XTRA above which does it for us
+ dnl
+ dnl dnl if we already compiled a sample program, X libs are surely there
+ dnl if test "$COMPILED_X_PROGRAM" = 0; then
+ dnl AC_MSG_CHECKING(for Xt library)
+ dnl WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt)
+ dnl if test "$ac_find_libraries" != "" ; then
+ dnl WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
+ dnl GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
+ dnl AC_MSG_RESULT(found at $ac_find_libraries)
+ dnl else
+ dnl AC_TRY_COMPILE
+ dnl (
+ dnl [
+ dnl #include <X11/Intrinsic.h>
+ dnl ],
+ dnl [
+ dnl char *p;
+ dnl p = XtMalloc(5);
+ dnl ],
+ dnl [
+ dnl AC_MSG_RESULT(found in default search path)
+ dnl COMPILED_X_PROGRAM=1
+ dnl ],
+ dnl [
+ dnl AC_MSG_RESULT(no)
+ dnl AC_MSG_ERROR(please set LDFLAGS to contain the location of libXt)
+ dnl ]
+ dnl )
+ dnl fi
+ dnl fi
+
+ XPM_LINK=""
+ AC_MSG_CHECKING(for Xpm library)
+ WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
+ if test "$ac_find_libraries" != "" ; then
+ WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
+ XPM_LINK="-lXpm "
+ AC_DEFINE(wxHAVE_LIB_XPM)
+ AC_MSG_RESULT(found at $ac_find_libraries)
+ else
+ AC_TRY_COMPILE(
+ [
+ #include <X11/xpm.h>
+ ],
+ [
+ int version;
+
+ version = XpmLibraryVersion();
+ ],
+ [
+ XPM_LINK="-lXpm "
+ AC_DEFINE(wxHAVE_LIB_XPM)
+ AC_MSG_RESULT(found in default search path)
+ COMPILED_X_PROGRAM=0
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(library will be compiled without support for images in XPM format)
+ ]
+ )
+ fi
+
+ GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXext -lXt -lX11"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
+ TOOLKIT=MOTIF
+
+ GUIHEADERS="\$(MOTIF_HEADERS)"
+ GUIOBJS="\$(MOTIF_GUIOBJS)"
+ COMMONOBJS="\$(MOTIF_COMMONOBJS)"
+ GENERICOBJS="\$(MOTIF_GENERICOBJS)"
+ GUIDEPS="\$(MOTIF_GUIDEPS)"
+ COMMONDEPS="\$(MOTIF_COMMONDEPS)"
+ GENERICDEPS="\$(MOTIF_GENERICDEPS)"
+ UNIXOBJS="\$(UNIX_OBJS)"
+ UNIXDEPS="\$(UNIX_DEPS)"
+ GUIDIST=MOTIF_DIST
+fi
+
+if test "$wxUSE_PM" = 1; then
+ TOOLKIT=PM
+
+ GUIOBJS="\$(PM_GUIOBJS)"
+ GUIHEADERS="\$(PM_HEADERS)"
+ COMMONOBJS="\$(PM_COMMONOBJS)"
+ GENERICOBJS="\$(PM_GENERICOBJS)"
+ GUIDEPS="\$(PM_GUIDEPS)"
+ COMMONDEPS="\$(PM_COMMONDEPS)"
+ GENERICDEPS="\$(PM_GENERICDEPS)"
+ UNIXOBJS=
+ UNIXDEPS=
+ GUIDIST=GTK_DIST
+fi
+
+dnl the name of the directory where the files for this toolkit live
+if test "$TOOLKIT" != "PM" ; then
+ TOOLKIT_DIR=`echo ${TOOLKIT} | tr "[[A-Z]]" "[[a-z]]"`
+else
+ TOOLKIT_DIR="os2"
+fi
+
+ dnl the (base) name of the library and support files for this toolkit
+ if test "$wxUSE_DEBUG_FLAG" = "yes"; then
+ TOOLKIT_NAME="${TOOLKIT_DIR}d"
+ else
+ TOOLKIT_NAME="${TOOLKIT_DIR}"
+ fi
+
+ dnl the symbol which allows conditional compilation for the given toolkit
+ TOOLKIT_DEF="-D__WX${TOOLKIT}__"
+
+ dnl the name of the (libtool) library
+ WX_LIBRARY="wx_${TOOLKIT_NAME}"
+
+ dnl the sources, their dependenices and the headers
+ ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS) \$(OGLOBJS)"
+
+ dnl ODBC objects are Unix only
+ if test "$TOOLKIT" != "MSW"; then
+ if test "$wxUSE_ODBC" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)"
+ fi
+ fi
+
+ if test "$wxUSE_LIBJPEG" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)"
+ fi
+ if test "$wxUSE_LIBTIFF" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(TIFFOBJS)"
+ fi
+ if test "$wxUSE_LIBPNG" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(PNGOBJS)"
+ fi
+ if test "$wxUSE_ZLIB" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)"
+ fi
+ ALL_DEPFILES="\$(GUIDEPS) \$(COMMONDEPS) \$(GENERICDEPS) \$(UNIXDEPS) \$(HTMLDEPS) \$(OGLDEPS)"
+
+ PORT_FILES="src/\$(TOOLKITDIR)/files.lst"
+ RPM_FILES="src/\$(TOOLKITDIR)/rpmfiles.lst"
+ RPM_SPEC="wx\$(TOOLKIT).spec"
+
+ dnl distribute samples/demos/utils with GUI versions
+ GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST"
+ DISTDIR="wx\$(TOOLKIT)"
+else
+ USE_GUI=0
+
+ dnl this may be (almost) unneccesary for wxBase now we use TOOLKIT_NAME
+ TOOLKIT_DIR="base"
+
+ dnl the base name of the library and wxXXX-config files
+ if test "$wxUSE_DEBUG_FLAG" = "yes"; then
+ TOOLKIT_NAME="${TOOLKIT_DIR}d"
+ else
+ TOOLKIT_NAME="${TOOLKIT_DIR}"
+ fi
+
+ TOOLKIT_DEF="-D__WXBASE__"
+
+ dnl the sources, their dependenices and the headers
+ ALL_OBJECTS="\$(BASE_OBJS) \${BASE_UNIX_OBJS}"
+ ALL_DEPFILES="\${BASE_DEPS} \${BASE_UNIX_DEPS}"
+
+ if test "$wxUSE_ZLIB" = "yes" ; then
+ ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)"
+ fi
+
+ dnl building wxBase only
+ WX_LIBRARY="wx_${TOOLKIT_NAME}"
+
+ PORT_FILES="src/files.lst"
+ RPM_FILES="src/rpmfiles.lst"
+ RPM_SPEC="wxBase.spec"
+
+ dnl distribute only wxBase sources/headers
+ GUIDIST="BASE_DIST"
+ DISTDIR="wxBase"
+fi
+
+dnl the name of the (libtool) library
+WX_LIBRARY_NAME="lib${WX_LIBRARY}.la"
+WX_LIBRARY_NAME_GL="lib${WX_LIBRARY}_gl.la"
+
+dnl the name of the static library
+WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
+WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a"
+
+dnl the name of the shared library
+WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+
+dnl the name of the links to the shared library
+WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}"
+WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so"
+WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so"
+WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}"
+WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so"
+WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so"
+
+dnl shared library settings
+SHARED_LD=
+PIC_FLAG=
+WX_ALL=
+WX_ALL_INSTALLED=
+BURNT_LIBRARY_NAME=
+WX_TARGET_LIBRARY_SONAME=
+
+dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
+
+if test "$wxUSE_SHARED" = "yes"; then
+ case "${host}" in
+ *-hp-hpux* )
+ if test "$GCC" = yes ; then
+ SHARED_LD="${CC} -shared -fPIC -o"
+ PIC_FLAG="-fPIC"
+ else
+ dnl no idea why it wants it, but it does
+ LDFLAGS="-L/usr/lib"
+
+ SHARED_LD="${CXX} -b -o"
+ PIC_FLAG="+Z"
+ fi
+ WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_NAME}.sl"
+ WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_NAME}_gl.sl"
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="preinstall_gl"
+ WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}"
+ else
+ WX_ALL="${WX_LIBRARY_NAME_SHARED}"
+ fi
+ ;;
+
+ dnl in fact, these settings are for any platform using gcc
+ *-*-linux* )
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ if test "$wxUSE_BURNT_NAME" = "yes" ; then
+ BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}"
+ BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}"
+ dnl substitute this in makelib.env for the contrib libs
+ WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)"
+ fi
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
+ WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
+ else
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ fi
+ ;;
+ *-*-irix5* | *-*-irix6* )
+ if test "$GCC" = yes ; then
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ else
+ SHARED_LD="${CXX} -shared -o"
+ fi
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
+ WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
+ else
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ fi
+ ;;
+ *-*-solaris2* )
+ if test "$GCC" = yes ; then
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+
+ dnl newer versions of gcc need -isystem to compile X headers on
+ dnl Solaris (which use old style C syntax)
+ CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include"
+ else
+ SHARED_LD="${CXX} -G -o"
+ PIC_FLAG="-KPIC"
+ fi
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
+ WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
+ else
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ fi
+ ;;
+ *-*-sunos4* )
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ ;;
+ *-*-freebsd* | *-*-netbsd*)
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
+ WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
+ else
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ fi
+ ;;
+ *-*-osf* )
+ SHARED_LD="${CXX} -shared -o"
+ PIC_FLAG="-fPIC"
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ ;;
+ *-*-dgux5* )
+ SHARED_LD="${CXX} -shared -o"
+ PIC_FLAG="-fPIC"
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ ;;
+ *-*-sysv5* )
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ ;;
+ *-*-aix* )
+ SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
+ WX_ALL=${WX_LIBRARY_NAME_SHARED}
+ ;;
+ *-*-cygwin32* )
+ dnl only static for now
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
+ WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="preinstall_gl"
+ WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}"
+ else
+ WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+ fi
+ ;;
+ *-*-mingw32* )
+ dnl only static for now
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
+ WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="preinstall_gl"
+ WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}"
+ else
+ WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+ fi
+ ;;
+ *-pc-os2_emx )
+ dnl only static for now
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
+ WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+ ;;
+ *-*-beos* )
+ dnl can't use gcc under BeOS for shared library creation because it
+ dnl complains about missing 'main'
+ SHARED_LD="${LD} -shared -o"
+ PIC_FLAG="-fPIC"
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ ;;
+ *)
+ AC_MSG_ERROR(unknown system type ${host}.)
+ esac
+
+ dnl set target to shared if not explicitly chose static before
+ if test "x$WX_TARGET_LIBRARY" = "x"; then
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
+ WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
+ fi
+ dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic
+ WX_TARGET_LIBRARY_TYPE="so"
+else
+ dnl set target to static
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
+ WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
+
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="preinstall_gl"
+ WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}"
+ else
+ WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+ fi
+
+ dnl give static wxBase build a working install target
+ if test "$wxUSE_GUI" = "no"; then
+ dnl we're here because WX_ALL_INSTALLED is empty, but play safe anyway
+ WX_ALL_INSTALLED="${WX_ALL_INSTALLED} preinstall"
+ fi
+
+ WX_TARGET_LIBRARY_TYPE="a"
+fi
+
+dnl ------------------------------------------------------------------------
+dnl Check for headers
+dnl ------------------------------------------------------------------------
+
+dnl defines HAVE_STRINGS_H (where some string functions live on AIX for example)
+AC_CHECK_HEADERS(strings.h)
+dnl defines HAVE_UNISTD_H
+AC_CHECK_HEADERS(unistd.h)
+dnl defines HAVE_WCHAR_H
+AC_CHECK_HEADERS(wchar.h)
+dnl defines HAVE_WCSTR_H
+AC_CHECK_HEADERS(wcstr.h)
+dnl defines HAVE_FNMATCH_H
+AC_CHECK_HEADERS(fnmatch.h)
+dnl defines HAVE_ICONV_H (Unix98 encoding conversion routines)
+AC_CHECK_HEADERS(iconv.h)
+dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
+AC_CHECK_HEADERS(langinfo.h)
+
+if test "$wxUSE_GUI" = "yes"; then
+ if test "$wxUSE_UNIX" = "yes"; then
+ dnl defines HAVE_X11_XKBLIB_H
+ AC_CHECK_HEADERS(X11/XKBlib.h)
+ fi
+fi
+
+dnl ---------------------------------------------------------------------------
+dnl Checks for typedefs
+dnl ---------------------------------------------------------------------------
+
+dnl defines mode_t if not already defined
+AC_TYPE_MODE_T
+dnl defines off_t if not already defined
+AC_TYPE_OFF_T
+dnl defines pid_t if not already defined
+AC_TYPE_PID_T
+dnl defines size_t if not already defined
+AC_TYPE_SIZE_T
+dnl defines uid_t and gid_t if not already defined
+AC_TYPE_UID_T
+
+dnl ---------------------------------------------------------------------------
+dnl Checks for structures
+dnl ---------------------------------------------------------------------------
+
+dnl does passwd struct has the pw_gecos field?
+AC_CACHE_CHECK([for pw_gecos in struct passwd], wx_cv_struct_pw_gecos,
+ [
+ AC_TRY_COMPILE([#include <pwd.h>],
+ [
+ char *p;
+ struct passwd *pw;
+ p = pw->pw_gecos;
+ ],
+ [
+ wx_cv_struct_pw_gecos=yes
+ ],
+ [
+ wx_cv_struct_pw_gecos=no
+ ]
+ )
+ ]
+)
+
+if test "$wx_cv_struct_pw_gecos" = "yes"; then
+ AC_DEFINE(HAVE_PW_GECOS)
+fi
+
+dnl ---------------------------------------------------------------------------
+dnl Checks for compiler characteristics
+dnl ---------------------------------------------------------------------------
+
+dnl defines const to be empty if c-compiler does not support const fully
+AC_C_CONST
+dnl defines inline to a sensible value for the c-compiler
+AC_C_INLINE
+
+dnl check the sizes of integral types (give some reasonable default values for
+dnl cross-compiling)
+dnl defines the size of certain types of variables in SIZEOF_<TYPE>
+AC_CHECK_SIZEOF(char, 1)
+AC_CHECK_SIZEOF(wchar_t, 4)
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(int *, 4)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(long long, 0)
+
+dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
+WX_C_BIGENDIAN
+
+dnl check for iostream (as opposed to iostream.h) standard header
+WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH))
+
+dnl check whether C++ compiler supports bool built-in type
+WX_CPP_BOOL
+
+dnl check whether we should define _GNU_SOURCE
+WX_GNU_EXTENSIONS
+
+dnl ---------------------------------------------------------------------------
+dnl Check for functions
+dnl ---------------------------------------------------------------------------
+
+dnl check for wcslen
+AC_CHECK_LIB(c, wcslen, [
+ AC_DEFINE(HAVE_WCSLEN)
+ WCHAR_LINK=""
+ ], [
+ AC_CHECK_LIB(w, wcslen, [
+ AC_DEFINE(HAVE_WCSLEN)
+ WCHAR_LINK="-lw"
+ ])
+ ])
+
+dnl check for vprintf/vsprintf() which are GNU extensions
+AC_FUNC_VPRINTF
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc
+dnl 2.1.1 for the first one, HP-UX for the second) it's available in the
+dnl library but the prototype is missing, so we can't use AC_CHECK_FUNCS here,
+dnl do it manually
+
+dnl we use AC_TRY_COMPILE() here instead of AC_TRY_RUN() to make the checks
+dnl work for cross-compilation, but AC_TRY_COMPILE() normally only compiles
+dnl one function while we need at least 2 - hence the ugly hack below. To
+dnl understand why it works, remember that AC_TRY_COMPILE() just prepends
+dnl "int main() {" in the beginning of the code and "; return 0; }" at the
+dnl end...
+
+dnl check for vsnprintf() - a safe version of vsprintf()
+AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
+[
+ AC_TRY_COMPILE([
+ #include <stdio.h>
+ #include <stdarg.h>
+ ], [
+ int wx_test_vsnprintf(const char *, ...);
+
+ wx_test_vsnprintf("%s");
+ return 0;
+ }
+
+ int wx_test_vsnprintf(const char *fmt, ...)
+ {
+ char *s;
+
+ va_list argp;
+ va_start(argp, fmt);
+ vsnprintf(s, 42, fmt, argp);
+ va_end(argp);
+ ], [
+ AC_DEFINE(HAVE_VSNPRINTF)
+ wx_cv_func_vsnprintf=yes
+ ], [
+ AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
+ wx_cv_func_vsnprintf=no
+ ])
+])
+
+dnl check for vsscanf()
+AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
+[
+ AC_TRY_COMPILE([
+ #include <stdio.h>
+ #include <stdarg.h>
+ ], [
+ int wx_test_vsscanf(const char *, ...);
+
+ wx_test_vsscanf("%d");
+ return 0;
+ }
+
+ int wx_test_vsscanf(const char *fmt, ...)
+ {
+ va_list argp;
+ va_start(argp, fmt);
+ vsscanf("42", fmt, argp);
+ va_end(argp);
+ ], [
+ AC_DEFINE(HAVE_VSSCANF)
+ wx_cv_func_vsscanf=yes
+ ], [
+ wx_cv_func_vsscanf=no
+ ])
+])
+
+AC_LANG_RESTORE
+
+dnl the following tests are for Unix(like) systems only
+if test "$TOOLKIT" != "MSW"; then
+
+dnl check for POSIX signals if we need them
+if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
+ AC_CHECK_FUNCS(sigaction)
+
+ if test "$ac_cv_func_sigaction" = "no"; then
+ AC_MSG_WARN([No POSIX signal functions on this system, wxApp::OnFatalException will not be called])
+ wxUSE_ON_FATAL_EXCEPTION=no
+ fi
+
+ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes"; then
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+ AC_CACHE_CHECK([for sa_handler type], wx_cv_type_sa_handler,
+ [
+ AC_TRY_COMPILE([#include <signal.h>],
+ [
+ extern void testSigHandler(int);
+
+ struct sigaction sa;
+ sa.sa_handler = testSigHandler;
+ ], [
+ wx_cv_type_sa_handler=int
+ ], [
+ wx_cv_type_sa_handler=void
+ ])
+ ])
+
+ AC_LANG_RESTORE
+
+ AC_DEFINE_UNQUOTED(wxTYPE_SA_HANDLER, $wx_cv_type_sa_handler)
+ fi
+fi
+
+dnl check for vfork() (even if it's the same as fork() in modern Unices)
+AC_CHECK_FUNCS(vfork)
+
+dnl check for timegm() used by datetime.cpp
+AC_CHECK_FUNCS(timegm)
+
+HAVE_SOME_SLEEP_FUNC=0
+if test "$USE_BEOS" = 1; then
+ dnl BeOS has its own (wonder where did they get it from) sleep() function
+ dnl in unistd.h
+ AC_DEFINE(HAVE_SLEEP)
+ HAVE_SOME_SLEEP_FUNC=1
+fi
+
+if test "$HAVE_SOME_SLEEP_FUNC" != 1; then
+ dnl try nanosleep() in libc and libposix4, if this fails - usleep()
+ POSIX4_LINK=
+ AC_CHECK_FUNCS(nanosleep,
+ AC_DEFINE(HAVE_NANOSLEEP),
+ [
+ AC_CHECK_LIB(posix4, nanosleep,
+ [
+ AC_DEFINE(HAVE_NANOSLEEP)
+ POSIX4_LINK="-lposix4"
+ ],
+ [
+ AC_CHECK_FUNCS(usleep)
+ AC_MSG_WARN([wxSleep() function will not work])
+ ]
+ )
+ ]
+ )
+fi
+
+dnl check for uname (POSIX) and gethostname (BSD)
+AC_CHECK_FUNCS(uname gethostname, break)
+
+dnl check for MT-safe version of strtok (on DEC Alpha, it's ok for C compiler
+dnl but not for C++ one - hence change language)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_CHECK_FUNCS(strtok_r)
+
+AC_LANG_RESTORE
+
+dnl check for inet_addr and inet_aton (these may live either in libc, or in
+dnl libnsl or libresolv)
+INET_LINK=
+AC_CHECK_FUNCS(inet_addr,
+ AC_DEFINE(HAVE_INET_ADDR),
+ [
+ AC_CHECK_LIB(nsl, inet_addr,
+ INET_LINK="nsl",
+ AC_CHECK_LIB(resolv, inet_addr,
+ INET_LINK="resolv"
+ )
+ )
+ ]
+)
+
+AC_CHECK_FUNCS(inet_aton,
+ AC_DEFINE(HAVE_INET_ATON),
+ [
+ dnl only check it in the same lib
+ AC_CHECK_LIB($INET_LINK, inet_aton, AC_DEFINE(HAVE_INET_ATON))
+ ])
+
+if test "x$INET_LINK" != "x"; then
+ AC_DEFINE(HAVE_INET_ADDR)
+ INET_LINK="-l$INET_LINK"
+fi
+
+fi
+dnl if !MSW
+
+dnl ===========================================================================
+dnl Now we have all the info we need - use it!
+dnl ===========================================================================
+
+dnl flush the cache
+AC_CACHE_SAVE
+
+dnl ---------------------------------------------------------------------------
+dnl thread support for Unix (always available under Win32)
+dnl ---------------------------------------------------------------------------
+
+dnl under MSW we always have thread support
+if test "$TOOLKIT" != "MSW"; then
+
+dnl the code below:
+dnl defines THREADS_OBJ which contains the object files to build
+dnl defines THREADS_LINK which contains the thread library to link with
+dnl defines wxUSE_THREADS=1 if thread support is activated
+
+THREADS_LINK=""
+THREADS_OBJ=""
+
+if test "$wxUSE_THREADS" = "yes" ; then
+ if test "$wxUSE_WINE" = 1 ; then
+ AC_MSG_WARN([Threads are not supported under WINE])
+ wxUSE_THREADS="no"
+ elif test "$USE_BEOS" = 1; then
+ AC_MSG_WARN([BeOS threads are not yet supported])
+ wxUSE_THREADS="no"
+ fi
+fi
+
+if test "$wxUSE_THREADS" = "yes" ; then
+ dnl find if POSIX threads are available
+
+ dnl AIX calls the library libpthreads - thanks IBM!
+ if test "$wxUSE_AIX" = 1; then
+ THREADS_LIB=pthreads
+ else
+ THREADS_LIB=pthread
+ fi
+
+ dnl standard lib name is pthread
+ dnl We no longer test for pthread-0.7 as it breaks compilation on some
+ dnl glibc2 systems, especially for static linkage.
+ AC_CHECK_LIB($THREADS_LIB, pthread_create, [
+ THREADS_OBJ="threadpsx.lo"
+ THREADS_LINK=$THREADS_LIB
+ ], [
+ dnl thread functions are in libc_r under FreeBSD
+ AC_CHECK_LIB(c_r, pthread_create, [
+ THREADS_OBJ="threadpsx.lo"
+ THREADS_LINK="c_r"
+ ], [
+ dnl VZ: SGI threads are not supported currently
+ AC_CHECK_HEADER(sys/prctl.h, [
+ THREADS_OBJ="threadsgi.lo"
+ ])
+ ])
+ ])
+
+ if test -z "$THREADS_OBJ" ; then
+ wxUSE_THREADS=no
+ AC_MSG_WARN(No thread support on this system)
+ fi
+fi
+
+dnl do other tests only if we are using threads
+if test "$wxUSE_THREADS" = "yes" ; then
+ AC_CHECK_FUNCS(thr_setconcurrency)
+
+ dnl define autoconf macro to check for given function in both pthread and
+ dnl posix4 libraries
+ dnl usage: AC_FUNC_THREAD(FUNCTION_NAME)
+ dnl VZ: TODO
+ dnl AC_DEFUN(AC_FUNC_THREAD,
+ dnl [
+ dnl AC_CHECK_LIB($THREADS_LINK, $1,
+ dnl AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z'),
+ dnl [AC_CHECK_LIB("posix4", $1,
+ dnl [AC_DEFINE(HAVE_`'translit($1, `A-Z', 'a-z'))
+ dnl POSIX4_LINK="-lposix4"
+ dnl ])
+ dnl ])
+ dnl ])
+
+ AC_CHECK_HEADERS(sched.h)
+
+ AC_CHECK_LIB($THREADS_LINK, sched_yield,
+ AC_DEFINE(HAVE_SCHED_YIELD),
+ [AC_CHECK_LIB("posix4", sched_yield,
+ [AC_DEFINE(HAVE_SCHED_YIELD) POSIX4_LINK="-lposix4"],
+ AC_MSG_WARN(wxThread::Yield will not work properly)
+ )]
+ )
+
+ dnl to be able to set the thread priority, we need to have all of the
+ dnl following functions:
+ dnl 1. pthread_attr_getschedpolicy
+ dnl 2. sched_get_priority_min and sched_get_priority_max
+ dnl (this one can be in either libpthread or libposix4 (under Solaris))
+ dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam
+ HAVE_PRIOR_FUNCS=0
+ AC_CHECK_LIB($THREADS_LINK, pthread_attr_getschedpolicy,
+ AC_CHECK_LIB($THREADS_LINK, pthread_attr_setschedparam,
+ AC_CHECK_LIB($THREADS_LINK, sched_get_priority_max,
+ HAVE_PRIOR_FUNCS=1,
+ AC_CHECK_LIB("posix4", sched_get_priority_max,
+ [
+ HAVE_PRIOR_FUNCS=1
+ POSIX4_LINK="-lposix4"
+ ],
+ )
+ )
+ )
+ )
+
+ if test "$HAVE_PRIOR_FUNCS" = 1; then
+ AC_DEFINE(HAVE_THREAD_PRIORITY_FUNCTIONS)
+ else
+ AC_MSG_WARN(Setting thread priority will not work)
+ fi
+
+ AC_CHECK_LIB($THREADS_LINK, pthread_cancel,
+ AC_DEFINE(HAVE_PTHREAD_CANCEL),
+ AC_MSG_WARN([wxThread::Kill() will not work properly]))
+
+ AC_CACHE_CHECK([for pthread_cleanup_push/pop], wx_cv_func_pthread_cleanup_push,
+ [
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [
+ pthread_cleanup_push(NULL, NULL);
+ pthread_cleanup_pop(0);
+ ], [
+ wx_cv_func_pthread_cleanup_push=yes
+ AC_DEFINE(HAVE_THREAD_CLEANUP_FUNCTIONS)
+ ], [
+ wx_cv_func_pthread_cleanup_push=no
+ ])
+ ])
+
+ THREADS_LINK="-l$THREADS_LINK"
+fi
+
+dnl from if !MSW
+fi
+
+if test "$wxUSE_THREADS" = "yes"; then
+ AC_DEFINE(wxUSE_THREADS)
+
+ dnl must define _REENTRANT for multithreaded code
+ CFLAGS="${CFLAGS} -D_REENTRANT"
+ CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
+else
+ dnl on some systems, _REENTRANT should be defined if we want to use any _r()
+ dnl functions - add tests for other functions here as well
+ if test "$ac_cv_func_strtok_r" = "yes"; then
+ AC_MSG_CHECKING(if -D_REENTRANT is needed)
+ if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
+ CFLAGS="${CFLAGS} -D_REENTRANT"
+ CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+fi