X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04e7a2161cfab26f59a5ca21ca5fe30ef477289f..f538710f0b798b21365fd614ba531055b225b115:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index b0dde1f005..43621eef19 100644 --- a/configure.in +++ b/configure.in @@ -102,7 +102,7 @@ CPP_MT_FLAG=-D_REENTRANT dnl the list of all available toolkits dnl dnl update NUM_TOOLKITS calculation below when adding a new toolkit here! -ALL_TOOLKITS="GTK MAC MGL MICROWIN MOTIF MSW PM WINE" +ALL_TOOLKITS="GTK MAC MGL MICROWIN MOTIF MSW PM WINE X11" dnl NB: these wxUSE_XXX constants have value of 0 or 1 unlike all the other ones dnl which are either yes or no @@ -114,6 +114,7 @@ DEFAULT_wxUSE_MOTIF=0 DEFAULT_wxUSE_MSW=0 DEFAULT_wxUSE_PM=0 DEFAULT_wxUSE_WINE=0 +DEFAULT_wxUSE_X11=0 dnl these are the values which are really default for the given platform - dnl they're not cached and are only used if no --with-toolkit was given *and* @@ -126,6 +127,7 @@ DEFAULT_DEFAULT_wxUSE_MOTIF=0 DEFAULT_DEFAULT_wxUSE_MSW=0 DEFAULT_DEFAULT_wxUSE_PM=0 DEFAULT_DEFAULT_wxUSE_WINE=0 +DEFAULT_DEFAULT_wxUSE_X11=0 PROGRAM_EXT= SO_SUFFIX=so @@ -253,7 +255,6 @@ case "${host}" in AC_DEFINE(__DOS__) PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_MGL=1 - DEFAULT_DEFAULT_wxUSE_SHARED=0 ;; *-pc-os2_emx | *-pc-os2-emx ) @@ -329,6 +330,8 @@ DEBUG_CONFIGURE=0 if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_UNIVERSAL=no + DEFAULT_wxUSE_NANOX=no + DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes @@ -362,7 +365,6 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_LIBJPEG=no DEFAULT_wxUSE_LIBTIFF=no DEFAULT_wxUSE_ODBC=no - DEFAULT_wxUSE_FREETYPE=no DEFAULT_wxUSE_OPENGL=no DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no @@ -502,6 +504,8 @@ if test $DEBUG_CONFIGURE = 1; then else DEFAULT_wxUSE_UNIVERSAL=no + DEFAULT_wxUSE_NANOX=no + DEFAULT_wxUSE_THREADS=yes DEFAULT_wxUSE_SHARED=yes @@ -534,7 +538,6 @@ else DEFAULT_wxUSE_LIBJPEG=yes DEFAULT_wxUSE_LIBTIFF=yes DEFAULT_wxUSE_ODBC=no - DEFAULT_wxUSE_FREETYPE=no DEFAULT_wxUSE_OPENGL=no DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes @@ -713,13 +716,14 @@ AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [wxUSE_MS AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [wxUSE_PM="$withval" CACHE_PM=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [wxUSE_MGL="$withval" CACHE_MGL=1 TOOLKIT_GIVEN=1]) AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [wxUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT_GIVEN=1]) +AC_ARG_WITH(x11, [ --with-x11 use X11], [wxUSE_X11="$withval" wxUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT_GIVEN=1]) +WX_ARG_ENABLE(nanox, [ --enable-nanox use NanoX], wxUSE_NANOX) AC_ARG_ENABLE(gtk2, [ --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)],wxUSE_GTK2=1,wxUSE_GTK2=0) WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG) WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG) WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF) -WX_ARG_SYS_WITH(freetype, [ --with-freetype use freetype (font rasterizer)], wxUSE_FREETYPE) WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL) fi @@ -1087,7 +1091,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl we suppose that expr is available (maybe there is a better way to do dnl this? what about using ALL_TOOLKITS? TODO) NUM_TOOLKITS=`expr ${wxUSE_GTK:-0} + ${wxUSE_MOTIF:-0} + ${wxUSE_MAC:-0} \ - + ${wxUSE_WINE:-0} + ${wxUSE_MSW:-0} + ${wxUSE_MGL:-0} + ${wxUSE_MICROWIN:-0}` + + ${wxUSE_WINE:-0} + ${wxUSE_MSW:-0} + ${wxUSE_MGL:-0} + ${wxUSE_MICROWIN:-0} + ${wxUSE_X11:-0}` dnl Allow wxUSE_PM only for OS/2 with EMX. dnl Path separator; ':' for unix. @@ -1215,6 +1219,27 @@ dnl strip command dnl defines STRIP as strip or nothing if not found AC_CHECK_PROG(STRIP, strip, strip, true) +dnl does make support "-include" (only GNU make does AFAIK)? +AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu, +[ + if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | + egrep qs GNU > /dev/null); then + wx_cv_prog_makeisgnu="yes" + else + wx_cv_prog_makeisgnu="no" + fi +]) + +if test "x$wx_cv_prog_makeisgnu" = "xyes"; then + IF_GNU_MAKE="" +else + IF_GNU_MAKE="#" +fi + +AC_SUBST(IF_GNU_MAKE) + +dnl we don't need to check for VPATH support in GNU make - it does have it +if test "x$wx_cv_prog_makeisgnu" != "xyes"; then dnl check if VPATH works AC_CACHE_CHECK([if make supports VPATH], wx_cv_prog_makevpath, [ dnl create Makefile @@ -1251,26 +1276,8 @@ setenv MAKE gmake; ./configure for csh-type shells Also please do remember to use gmake in this case every time you are trying to compile. ]) -fi - -dnl does make support "-include" (only GNU make does AFAIK)? -AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu, -[ - if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null | - grep GNU 2>&1 > /dev/null); then - wx_cv_prog_makeisgnu="yes" - else - wx_cv_prog_makeisgnu="no" - fi -]) - -if test "x$wx_cv_prog_makeisgnu" = "xyes"; then - IF_GNU_MAKE="" -else - IF_GNU_MAKE="#" -fi - -AC_SUBST(IF_GNU_MAKE) +fi dnl make without VPATH +fi dnl not GNU make dnl YACC checks dnl defines YACC with the appropriate command @@ -1461,32 +1468,41 @@ PNG_INCLUDE= PNG_LINK= if test "$wxUSE_LIBPNG" != "no" ; then AC_DEFINE(wxUSE_LIBPNG) + + if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then + AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead]) + wxUSE_LIBPNG=sys + fi dnl for the check below to have a chance to succeed, we must already have - dnl libz somewhere - if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then + dnl libz somewhere (don't do this when bulding wxMGL since its libpng + dnl doesn't depend on zlib) + if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead]) wxUSE_LIBPNG=builtin fi - if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then - AC_CHECK_HEADER(png.h, - AC_CHECK_LIB(png, png_check_sig, - PNG_LINK=" -lpng", - , - [-lz -lm]) - ) + if test "$wxUSE_MGL" != 1 ; then + dnl Don't check for libpng when building wxMGL, libmgl contains it + if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then + AC_CHECK_HEADER(png.h, + AC_CHECK_LIB(png, png_check_sig, + PNG_LINK=" -lpng", + , + [-lz -lm]) + ) - if test "x$PNG_LINK" = "x" ; then - if test "$wxUSE_LIBPNG" = "sys" ; then - AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version]) + if test "x$PNG_LINK" = "x" ; then + if test "$wxUSE_LIBPNG" = "sys" ; then + AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version]) + else + AC_MSG_WARN([system png library not found, will use built-in instead]) + wxUSE_LIBPNG=builtin + fi else - AC_MSG_WARN([system png library not found, will use built-in instead]) - wxUSE_LIBPNG=builtin + dnl we are using the system library + wxUSE_LIBPNG=yes fi - else - dnl we are using the system library - wxUSE_LIBPNG=yes fi fi @@ -1506,40 +1522,48 @@ JPEG_LINK= if test "$wxUSE_LIBJPEG" != "no" ; then AC_DEFINE(wxUSE_LIBJPEG) - if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then - dnl can't use AC_CHECK_HEADER as jconfig.h defines things like - dnl HAVE_STDLIB_H which are already defined and this provokes - dnl a compiler warning which configure considers as an error... - AC_MSG_CHECKING(for jpeglib.h) - AC_CACHE_VAL(ac_cv_header_jpeglib_h, - AC_TRY_COMPILE( - [ - #undef HAVE_STDLIB_H - #include - #include - ], - [ - ], - ac_cv_header_jpeglib_h=yes, - ac_cv_header_jpeglib_h=no + if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then + AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead]) + wxUSE_LIBJPEG=sys + fi + + if test "$wxUSE_MGL" != 1 ; then + dnl Don't check for libjpeg when building wxMGL, libmgl contains it + if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then + dnl can't use AC_CHECK_HEADER as jconfig.h defines things like + dnl HAVE_STDLIB_H which are already defined and this provokes + dnl a compiler warning which configure considers as an error... + AC_MSG_CHECKING(for jpeglib.h) + AC_CACHE_VAL(ac_cv_header_jpeglib_h, + AC_TRY_COMPILE( + [ + #undef HAVE_STDLIB_H + #include + #include + ], + [ + ], + ac_cv_header_jpeglib_h=yes, + ac_cv_header_jpeglib_h=no + ) ) - ) - AC_MSG_RESULT($ac_cv_header_jpeglib_h) + AC_MSG_RESULT($ac_cv_header_jpeglib_h) - if test "$ac_cv_header_jpeglib_h" = "yes"; then - AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg") - fi + if test "$ac_cv_header_jpeglib_h" = "yes"; then + AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg") + fi - if test "x$JPEG_LINK" = "x" ; then - if test "$wxUSE_LIBJPEG" = "sys" ; then - AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version]) + if test "x$JPEG_LINK" = "x" ; then + if test "$wxUSE_LIBJPEG" = "sys" ; then + AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version]) + else + AC_MSG_WARN([system jpeg library not found, will use built-in instead]) + wxUSE_LIBJPEG=builtin + fi else - AC_MSG_WARN([system jpeg library not found, will use built-in instead]) - wxUSE_LIBJPEG=builtin + dnl we are using the system library + wxUSE_LIBJPEG=sys fi - else - dnl we are using the system library - wxUSE_LIBJPEG=sys fi fi @@ -1583,41 +1607,6 @@ if test "$wxUSE_LIBTIFF" != "no" ; then fi fi -dnl ------------------------------------------------------------------------ -dnl Check for freetype library -dnl ------------------------------------------------------------------------ - -FREETYPE_INCLUDE= -FREETYPE_LINK= -if test "$wxUSE_FREETYPE" != "no" ; then - AC_DEFINE(wxUSE_FREETYPE) - - if test "$wxUSE_FREETYPE" = "sys" -o "$wxUSE_FREETYPE" = "yes" ; then - AC_CHECK_HEADER(freetype.h, - AC_CHECK_LIB(freetype, FT_Render_Glyph, - FREETYPE_LINK=" -lfreetype", - , - [-lm]) - ) - - if test "x$FREETYPE_LINK" = "x" ; then - if test "$wxUSE_FREETYPE" = "sys" ; then - AC_MSG_ERROR([system freetype library not found! Use --with-freetype=builtin to use built-in version]) - else - AC_MSG_WARN([system freetype library not found, will use built-in instead]) - wxUSE_FREETYPE=builtin - fi - else - dnl we are using the system library - wxUSE_FREETYPE=sys - fi - fi - - if test "$wxUSE_FREETYPE" = "builtin" ; then - FREETYPE_INCLUDE="-I\${top_srcdir}/src/freetype" - fi -fi - dnl ---------------------------------------------------------------- dnl search for toolkit (widget sets) dnl ---------------------------------------------------------------- @@ -1851,6 +1840,74 @@ equivalent variable and GTK+ is version 1.2.3 or above. TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__ -D__WXMSW__ -D__WIN95__ -D__WIN32__ -DMWIN -DMICROWIN_NOCONTROLS -DMICROWIN_TODO=1" fi + if test "$wxUSE_X11" = 1; then + dnl use standard macros to check for X headers/libs, this brings support + dnl for the standard configure options --x-includes and --x-libraries + AC_PATH_XTRA + + 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 + COMPILED_X_PROGRAM=0 + + if test "$wxUSE_NANOX" = "yes"; then + AC_MSG_CHECKING(for MicroWindows/NanoX distribution) + if test "x$MICROWIN" = x ; then + AC_MSG_RESULT(not found) + AC_MSG_ERROR([Cannot find MicroWindows library. Make sure MICROWIN is set.]) + else + AC_MSG_RESULT($MICROWIN) + fi + 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 + ], + [ + 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 + + if test "$wxUSE_NANOX" = "yes"; then + TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__" + GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$MICROWIN/src/lib/libnano-X.a \$MICROWIN/src/lib/libmwengine.a \$MICROWIN/src/lib/libmwfonts.a \$MICROWIN/src/lib/libmwdrivers.a \$MICROWIN/src/lib/libmwobjects.a" + else + GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11$xpm_link" + fi + + TOOLKIT_VPATH="\${top_srcdir}/src/x11" + TOOLKIT=X11 + GUIDIST=X11_DIST + fi + if test "$wxUSE_WINE" = 1; then AC_CHECK_HEADER(windows.h, [], [ @@ -2027,12 +2084,21 @@ equivalent variable and GTK+ is version 1.2.3 or above. if test "$wxUSE_UNIVERSAL" = "yes"; then ALL_OBJECTS="\$(GUI_LOWLEVEL_OBJS) \${UNIVOBJS}" + + dnl ALL_SOURCES and ALL_HEADERS shouldn't include really all sources + dnl and headers as some/most are not needed for wxUniv but I don't + dnl have time to add GUI_LOWLEVEL_SOURCES/HEADERS stuff now (TODO!) + ALL_SOURCES="\$(ALL_SOURCES) \${UNIV_SOURCES}" + ALL_HEADERS="\$(ALL_HEADERS) \${UNIV_HEADERS}" + PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst" TOOLKIT_VPATH="\${top_srcdir}/src/univ${PATH_IFS}\${top_srcdir}/src/univ/themes${PATH_IFS}\${top_srcdir}/src/${TOOLKIT_DIR}" TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__" WIDGET_SET=univ else ALL_OBJECTS="\$(GUIOBJS)" + ALL_SOURCES="\$(ALL_SOURCES)" + ALL_HEADERS="\$(ALL_HEADERS)" fi ALL_OBJECTS="${ALL_OBJECTS} \$(COMMONOBJS) \$(GENERICOBJS)" @@ -2045,10 +2111,6 @@ equivalent variable and GTK+ is version 1.2.3 or above. ALL_OBJECTS="${ALL_OBJECTS} \$(HTMLOBJS)" fi - dnl ODBC objects are Unix only - if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" - fi if test "$wxUSE_LIBJPEG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)" fi @@ -2058,9 +2120,6 @@ equivalent variable and GTK+ is version 1.2.3 or above. if test "$wxUSE_LIBPNG" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(PNGOBJS)" fi - if test "$wxUSE_FREETYPE" = "builtin" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(FREETYPEOBJS)" - fi dnl distribute samples/demos/utils with GUI versions GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST" @@ -2085,6 +2144,9 @@ else TOOLKIT_VPATH="\${top_srcdir}/src/unix" fi + ALL_SOURCES="\$(ALL_SOURCES)" + ALL_HEADERS="\$(ALL_HEADERS)" + PORT_FILES="\${top_srcdir}/src/files.lst" dnl distribute only wxBase sources/headers @@ -2095,6 +2157,12 @@ fi dnl --------------------------------------------------------------------------- dnl Optional libraries included when system library is not used dnl --------------------------------------------------------------------------- + +dnl ODBC objects are Unix only +if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" +fi + if test "$wxUSE_REGEX" = "builtin" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)" fi @@ -2255,6 +2323,17 @@ fi dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP --- +if test "$wxUSE_SHARED" = "yes"; then + case "${host}" in + *-pc-os2_emx | *-pc-os2-emx | \ + *-pc-msdosdjgpp ) + dnl only static for now + wxUSE_SHARED=no + AC_MSG_WARN([Host system doesn't support shared libraries, disabling]) + ;; + esac +fi + if test "$wxUSE_SHARED" = "yes"; then dnl install targets @@ -2366,11 +2445,6 @@ if test "$wxUSE_SHARED" = "yes"; then fi ;; - *-pc-os2_emx | *-pc-os2-emx ) - dnl only static for now - wxUSE_SHARED=no - ;; - *-*-beos* ) dnl can't use gcc under BeOS for shared library creation because it dnl complains about missing 'main' @@ -2972,7 +3046,7 @@ 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) +dnl libnsl or libresolv or libsocket) INET_LINK= AC_CHECK_FUNCS(inet_addr, AC_DEFINE(HAVE_INET_ADDR), @@ -2980,7 +3054,10 @@ AC_CHECK_FUNCS(inet_addr, AC_CHECK_LIB(nsl, inet_addr, INET_LINK="nsl", AC_CHECK_LIB(resolv, inet_addr, - INET_LINK="resolv" + INET_LINK="resolv", + AC_CHECK_LIB(socket, inet_addr, + INET_LINK="socket" + ) ) ) ] @@ -3646,10 +3723,17 @@ dnl ------------------------------------------------------------------------ dnl wxSocket dnl ------------------------------------------------------------------------ -dnl under MSW we always have sockets -if test "$TOOLKIT" != "MSW"; then +dnl VZ: the GUI hooks wxSocket needs are not implemented yet in wxX11 +if test "$wxUSE_SOCKETS" = "yes"; then + if test "$TOOLKIT" = "X11"; then + AC_MSG_WARN([wxSocket not yet supported under X11... disabled]) + wxUSE_SOCKETS="no" + fi +fi - if test "$wxUSE_SOCKETS" = "yes"; then +if test "$wxUSE_SOCKETS" = "yes"; then + dnl under MSW we always have sockets + if test "$TOOLKIT" != "MSW"; then dnl under Solaris, socket functions live in -lsocket AC_CHECK_FUNC(socket,, AC_CHECK_LIB(socket, socket, @@ -3661,12 +3745,13 @@ if test "$TOOLKIT" != "MSW"; then ) ) fi +fi +if test "$wxUSE_SOCKETS" = "yes" ; then dnl this test may be appropriate if building under cygwin dnl right now I'm assuming it also uses the winsock stuff dnl like mingw does.. -- RL - - if test "$wxUSE_SOCKETS" = "yes" ; then + if test "$TOOLKIT" != "MSW"; then dnl determine the type of third argument for getsockname AC_CACHE_CHECK([what is the type of the third argument of getsockname], wx_cv_type_getsockname3, @@ -3720,7 +3805,6 @@ if test "$TOOLKIT" != "MSW"; then fi fi fi -dnl if !MSW if test "$wxUSE_SOCKETS" = "yes" ; then AC_DEFINE(wxUSE_SOCKETS) @@ -3741,6 +3825,10 @@ if test "$wxUSE_GUI" = "yes"; then AC_MSG_WARN([Joystick not yet supported under Motif... disabled]) wxUSE_JOYSTICK=no fi + if test "$TOOLKIT" = "X11"; then + AC_MSG_WARN([Joystick not yet supported under X11... disabled]) + wxUSE_JOYSTICK=no + fi dnl under MSW we always have joystick support if test "$TOOLKIT" != "MSW"; then @@ -3896,7 +3984,7 @@ fi if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then if test "$wxUSE_UNIVERSAL" = "yes"; then - AC_MSG_WARN(MDI not yet supported for wxUNIVERSAL... disabled) + AC_MSG_WARN(MDI not yet supported for wxUniversal... disabled) wxUSE_MDI_ARCHITECTURE=no fi @@ -3955,8 +4043,12 @@ if test "$wxUSE_PROLOGIO" = "yes" ; then fi if test "$wxUSE_RESOURCES" = "yes" ; then - AC_DEFINE(wxUSE_RESOURCES) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + if test "$wxUSE_NANOX" = "yes"; then + AC_MSG_WARN([Cannot use resource database functions in NanoX]) + else + AC_DEFINE(wxUSE_RESOURCES) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + fi fi if test "$wxUSE_X_RESOURCES" = "yes"; then @@ -4010,10 +4102,17 @@ if test "$wxUSE_IPC" = "yes"; then fi if test "$wxUSE_CLIPBOARD" = "yes"; then - AC_DEFINE(wxUSE_CLIPBOARD) + if test "$wxUSE_X11" = 1; then + AC_MSG_WARN([Clipboard not yet supported under X11... disabled]) + wxUSE_CLIPBOARD=no + fi + + if test "$wxUSE_CLIPBOARD" = "yes"; then + AC_DEFINE(wxUSE_CLIPBOARD) - dnl required by clipboard code in configuration check - AC_DEFINE(wxUSE_DATAOBJ) + dnl required by clipboard code in configuration check + AC_DEFINE(wxUSE_DATAOBJ) + fi fi if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then @@ -4029,6 +4128,11 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then wxUSE_DRAG_AND_DROP=no fi + if test "$wxUSE_X11" = 1; then + AC_MSG_WARN([Drag and drop not yet supported under X11... disabled]) + wxUSE_DRAG_AND_DROP=no + fi + if test "$wxUSE_DRAG_AND_DROP" = "yes"; then AC_DEFINE(wxUSE_DRAG_AND_DROP) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd" @@ -4235,7 +4339,7 @@ if test "$wxUSE_TOGGLEBTN" = "yes"; then wxUSE_TOGGLEBTN=no fi if test "$wxUSE_UNIVERSAL" = "yes"; then - AC_MSG_WARN([Toggle button not yet supported under wxUNIVERSAL... disabled]) + AC_MSG_WARN([Toggle button not yet supported under wxUniversal... disabled]) wxUSE_TOGGLEBTN=no fi @@ -4276,7 +4380,7 @@ if test "$wxUSE_TOOLTIPS" = "yes"; then AC_MSG_WARN([wxTooltip not supported under WINE... disabled]) else if test "$wxUSE_UNIVERSAL" = "yes"; then - AC_MSG_WARN([wxTooltip not supported yet in wxUNIVERSAL... disabled]) + AC_MSG_WARN([wxTooltip not supported yet in wxUniversal... disabled]) else AC_DEFINE(wxUSE_TOOLTIPS) fi @@ -4301,15 +4405,23 @@ if test "$wxUSE_POPUPWIN" = "yes"; then if test "$wxUSE_MOTIF" = 1; then AC_MSG_WARN([wxPopupWindow not yet supported under Motif... disabled]) else - AC_DEFINE(wxUSE_POPUPWIN) + if test "$wxUSE_PM" = 1; then + AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled]) + else + AC_DEFINE(wxUSE_POPUPWIN) - USES_CONTROLS=1 + USES_CONTROLS=1 + fi fi fi fi if test "$wxUSE_TIPWINDOW" = "yes"; then - AC_DEFINE(wxUSE_TIPWINDOW) + if test "$wxUSE_PM" = 1; then + AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled]) + else + AC_DEFINE(wxUSE_TIPWINDOW) + fi fi if test "$USES_CONTROLS" = 1; then @@ -4547,11 +4659,11 @@ dnl FIXME: should this be covered by the conditional above dnl given the -lm comment there? Or should that comment (and dnl this one) be removed.. [ 7 Nov 2001 ] -LIBS="$ZLIB_LINK$POSIX4_LINK$INET_LINK$WCHAR_LINK$THREADS_LINK$DL_LINK -lm$LIBS" +LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DL_LINK -lm $LIBS" if test "$wxUSE_GUI" = "yes"; then - LIBS=" $GUI_TK_LIBRARY$PNG_LINK$JPEG_LINK$TIFF_LINK$FREETYPE_LINK$LIBS" + LIBS="$GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LIBS" dnl TODO add checks that these samples will really compile (i.e. all the dnl library features they need are present) @@ -4571,8 +4683,7 @@ fi dnl all -I options we must pass to the compiler INCLUDES="-I\${top_builddir}/lib/wx/include/${TOOLCHAIN_NAME} -I\${top_srcdir}/include \ -$REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE \ -$FREETYPE_INCLUDE $TOOLKIT_INCLUDE" +$REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $TOOLKIT_INCLUDE" dnl wxGTK does not need TOOLKIT includes in wx-config if test "$wxUSE_GTK" = 1; then @@ -4672,8 +4783,10 @@ AC_SUBST(WXCONFIG_LIBS_STATIC) AC_SUBST(WXCONFIG_LIBS_STATIC_GL) AC_SUBST(WXCONFIG_INCLUDE) -dnl what to compile +dnl the list of files to compile/install AC_SUBST(ALL_OBJECTS) +AC_SUBST(ALL_HEADERS) +AC_SUBST(ALL_SOURCES) dnl distribution vars AC_SUBST(GUIDIST) @@ -4728,6 +4841,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl we need to pass SAMPLES_SUBDIRS (and some other) to the configure in dnl samples and the only way to do it is, again, use the cache wx_cv_path_samplesubdirs=$SAMPLES_SUBDIRS + wx_cv_if_gnu_make=$IF_GNU_MAKE wx_cv_path_ifs=$PATH_IFS wx_cv_program_ext=$PROGRAM_EXT wx_cv_target_library=$WX_TARGET_LIBRARY @@ -4735,7 +4849,8 @@ if test "$wxUSE_GUI" = "yes"; then wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE dnl we need to export them because passing them through cache won't dnl work when cache=/dev/null (which is default for autoconf 2.50) - export wx_cv_path_samplesubdirs wx_cv_path_ifs wx_cv_program_ext \ + export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \ + wx_cv_path_ifs wx_cv_program_ext \ wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype AC_CONFIG_SUBDIRS(demos samples utils contrib) fi