X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f79bd02d8e266982041053fece8076abf89cd5d3..59c962bf54667cab735353b2ec3b7a2438464f22:/configure.in diff --git a/configure.in b/configure.in index 66c44d079a..92404961ea 100644 --- a/configure.in +++ b/configure.in @@ -255,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 ) @@ -331,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 @@ -364,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 @@ -504,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 @@ -536,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 @@ -715,14 +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" CACHE_X11=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 @@ -1222,7 +1223,7 @@ 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 -s GNU); then + egrep qs GNU > /dev/null); then wx_cv_prog_makeisgnu="yes" else wx_cv_prog_makeisgnu="no" @@ -1606,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 ---------------------------------------------------------------- @@ -1888,6 +1854,16 @@ equivalent variable and GTK+ is version 1.2.3 or above. AFMINSTALL=afminstall COMPILED_X_PROGRAM=0 + if test "$wxUSE_NANOX" = 1; 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) @@ -1919,11 +1895,17 @@ equivalent variable and GTK+ is version 1.2.3 or above. ) fi - GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXext -lXt -lX11" + if test "$wxUSE_NANOX" = 1; 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 - TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WXUNIVERSAL__ -D__WXX11__" fi if test "$wxUSE_WINE" = 1; then @@ -2138,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" @@ -2165,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 @@ -2341,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 @@ -2452,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' @@ -3058,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), @@ -3066,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" + ) ) ) ] @@ -3732,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, @@ -3747,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, @@ -3806,7 +3805,6 @@ if test "$TOOLKIT" != "MSW"; then fi fi fi -dnl if !MSW if test "$wxUSE_SOCKETS" = "yes" ; then AC_DEFINE(wxUSE_SOCKETS) @@ -3986,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 @@ -4100,10 +4098,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 @@ -4330,7 +4335,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 @@ -4371,7 +4376,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 @@ -4396,15 +4401,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 @@ -4642,11 +4655,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) @@ -4666,8 +4679,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