X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb9e79c05e26cbb3cdf3799910e69cea359efef3..254e112c27c87458a72efd5dcfe1c8ae50738b60:/configure.in diff --git a/configure.in b/configure.in index a404ddd280..fc5c4281a0 100644 --- a/configure.in +++ b/configure.in @@ -44,6 +44,11 @@ WX_SUBVERSION=$WX_VERSION.$wx_subrelease_number WX_MSW_VERSION=$wx_major_version_number$wx_minor_version_number$wx_release_number +dnl Autoconf-2.60 changed the meaning of top_builddir variable, so we have +dnl to use our own replacement that will work with both 2.5x and 2.60+: +wx_top_builddir="`pwd`" +AC_SUBST(wx_top_builddir) + dnl ------------------------------------------------------------------------ dnl Check platform (host system) @@ -1027,7 +1032,7 @@ WX_ARG_ENABLE(loggui, [ --enable-loggui use standard GUI logger], WX_ARG_ENABLE(logwin, [ --enable-logwin use wxLogWindow], wxUSE_LOGWINDOW) WX_ARG_ENABLE(logdialog, [ --enable-logdialog use wxLogDialog], wxUSE_LOGDIALOG) WX_ARG_ENABLE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac)], wxUSE_WEBKIT) -WX_ARG_ENABLE(html, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT) +WX_ARG_ENABLE(richtext, [ --enable-richtext use wxRichTextCtrl], wxUSE_RICHTEXT) WX_ARG_ENABLE(graphics_ctx, [ --enable-graphics_ctx use graphics context 2D drawing API], wxUSE_GRAPHICS_CONTEXT) dnl --------------------------------------------------------------------------- @@ -1416,61 +1421,6 @@ else fi fi -dnl --------------------------------------------------------------------------- -dnl When we are using Cygwin with Motif/GTK+, we want it to appear like -dnl 'just' a POSIX platform, so the Win32 API must not be available -dnl --------------------------------------------------------------------------- -dnl (Windows-only piece) -wants_win32=0 -doesnt_want_win32=0 -case "${host}" in - *-*-cygwin*) - if test "$wxUSE_MSW" = 1 ; then - wants_win32=1 - BAKEFILE_FORCE_PLATFORM=win32 - else - doesnt_want_win32=1 - fi - ;; - *-*-mingw*) - wants_win32=1 - ;; -esac - -dnl --------------------------------------------------------------------------- -dnl Wine is a virtual platform, we need to patch things up a bit -dnl --------------------------------------------------------------------------- -if test "$wxUSE_WINE" = "yes"; then - wants_win32=1 - dnl FIXME: we should do a better job of testing for these - CC=winegcc - CXX=wineg++ - LDFLAGS_GUI="-mwindows" -fi - -dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only -dnl take effect on Cygwin/Mingw and not other platforms. -if test "$wants_win32" = 1 ; then - USE_UNIX=0 - USE_WIN32=1 - AC_DEFINE(__WIN32__) - AC_DEFINE(__WIN95__) - AC_DEFINE(__WINDOWS__) - AC_DEFINE(__GNUWIN32__) - AC_DEFINE(STRICT) - AC_DEFINE(WINVER, 0x0400) -fi -if test "$doesnt_want_win32" = 1 ; then - USE_UNIX=1 - USE_WIN32=0 -fi -dnl (end of Windows-only piece) - -if test "$USE_UNIX" = 1 ; then - wxUSE_UNIX=yes - AC_DEFINE(__UNIX__) -fi - dnl --------------------------------------------------------------------------- dnl Checks for programs dnl --------------------------------------------------------------------------- @@ -1683,6 +1633,77 @@ case "${host}" in ;; esac +dnl Determine whether we want to use Cygwin as Windows or POSIX platform: the +dnl latter makes more sense for wxGTK/Motif/X11 ports +wants_win32=0 +doesnt_want_win32=0 +case "${host}" in + *-*-cygwin*) + if test "$wxUSE_MSW" = 1 ; then + wants_win32=1 + else + dnl when we use cygwin compiler with -mno-cygwin option it uses mingw32 + dnl headers and libraries, so it's Windows-like in this case + AC_CACHE_CHECK([if -mno-cygwin is in effect], wx_cv_nocygwin, + [ + AC_TRY_COMPILE( + [], + [ + #ifdef __MINGW32__ + choke me + #endif + ], + wx_cv_nocygwin=no, + wx_cv_nocygwin=yes + ) + ] + ) + + if test "$wx_cv_nocygwin" = "yes"; then + wants_win32=1 + else + doesnt_want_win32=1 + fi + fi + if test "$wants_win32" = 1 ; then + BAKEFILE_FORCE_PLATFORM=win32 + fi + ;; + *-*-mingw*) + wants_win32=1 + ;; +esac + +if test "$wxUSE_WINE" = "yes"; then + wants_win32=1 + dnl FIXME: we should do a better job of testing for these + CC=winegcc + CXX=wineg++ + LDFLAGS_GUI="-mwindows" +fi + +dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only +dnl take effect on Cygwin/Mingw and not other platforms. +if test "$wants_win32" = 1 ; then + USE_UNIX=0 + USE_WIN32=1 + AC_DEFINE(__WIN32__) + AC_DEFINE(__WIN95__) + AC_DEFINE(__WINDOWS__) + AC_DEFINE(__GNUWIN32__) + AC_DEFINE(STRICT) +fi +if test "$doesnt_want_win32" = 1 ; then + USE_UNIX=1 + USE_WIN32=0 +fi +dnl (end of Windows-only piece) + +if test "$USE_UNIX" = 1 ; then + wxUSE_UNIX=yes + AC_DEFINE(__UNIX__) +fi + dnl This case is for OS/2 vs. everything else case "${host}" in *-pc-os2_emx | *-pc-os2-emx ) @@ -3854,25 +3875,26 @@ if test "$wxUSE_OPENGL" = "yes"; then elif test "$wxUSE_MSW" = 1; then OPENGL_LIBS="-lopengl32 -lglu32" else - dnl David Elliott: Without this snippet AC_CHECK_HEADER fails to find - dnl GL/gl.h on Mac OS X where it is located in - dnl /usr/X11R6/include/GL/gl.h: - - WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, GL/gl.h) + dnl adjust CPPFLAGS to include GL/gl.h location if necessary + dnl (/opt/graphics/OpenGL is for HP-UX systems, bug 925307) + AC_MSG_CHECKING([for OpenGL headers]) + WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /opt/graphics/OpenGL/include], GL/gl.h) if test "$ac_find_includes" != "" ; then AC_MSG_RESULT(found in $ac_find_includes) WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS) CPPFLAGS="$ac_path_to_include $CPPFLAGS" + else + AC_MSG_RESULT([not found]) fi - AC_CHECK_HEADER(GL/gl.h, - [ + AC_CHECK_HEADER(GL/gl.h, [ + AC_CHECK_HEADER(GL/glu.h, [ found_gl=0 AC_MSG_CHECKING([for -lGL]) - WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],GL) + WX_PATH_FIND_LIBRARIES([$SEARCH_LIB /opt/graphics/OpenGL/lib],GL) if test "$ac_find_libraries" != "" ; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([found in $ac_find_libraries]) WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS]) if test "$ac_path_to_link" != " -L/usr/lib" ; then @@ -3914,6 +3936,7 @@ if test "$wxUSE_OPENGL" = "yes"; then fi fi ]) + ]) if test "x$OPENGL_LIBS" = "x"; then dnl it should be an error and not a warning because OpenGL is not on @@ -3953,11 +3976,11 @@ fi if test "$wxUSE_SHARED" = "yes"; then dnl use versioned symbols if available on the platform - WX_VERSIONED_SYMBOLS([\$(top_builddir)version-script]) + WX_VERSIONED_SYMBOLS([\$(wx_top_builddir)/version-script]) case "${host}" in *-*-linux* | *-*-gnu* ) - SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib" + SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib" WXCONFIG_RPATH="-Wl,-rpath,\$libdir" ;; @@ -3976,7 +3999,7 @@ if test "$wxUSE_SHARED" = "yes"; then [],[], [ AC_MSG_RESULT([yes]) - SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib" + SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(wx_top_builddir)/lib" WXCONFIG_RPATH="-Wl,-rpath,\$libdir" ],[ AC_MSG_RESULT([no]) @@ -3986,7 +4009,7 @@ if test "$wxUSE_SHARED" = "yes"; then [],[], [ AC_MSG_RESULT([yes]) - SAMPLES_RPATH_FLAG="-Wl,-R,\$(top_builddir)lib" + SAMPLES_RPATH_FLAG="-Wl,-R,\$(wx_top_builddir)/lib" WXCONFIG_RPATH="-Wl,-R,\$libdir" ],[ AC_MSG_RESULT([no]) @@ -3994,7 +4017,7 @@ if test "$wxUSE_SHARED" = "yes"; then ]) LDFLAGS="$saveLdflags" else - SAMPLES_RPATH_FLAG="-R\$(top_builddir)lib" + SAMPLES_RPATH_FLAG="-R\$(wx_top_builddir)/lib" WXCONFIG_RPATH="-R\$libdir" fi ;; @@ -4002,7 +4025,7 @@ if test "$wxUSE_SHARED" = "yes"; then *-*-darwin* ) install_name_tool=`which install_name_tool` if test "$install_name_tool" -a -x "$install_name_tool"; then - SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@" + SAMPLES_RPATH_POSTLINK="\$(wx_top_builddir)/change-install-names \$(LIBDIRNAME) \$(prefix) \$@" cat <change-install-names #!/bin/sh libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\` @@ -4023,7 +4046,7 @@ EOF ;; *-*-hpux* ) - SAMPLES_RPATH_FLAG="-Wl,+b,\$(top_builddir)lib" + SAMPLES_RPATH_FLAG="-Wl,+b,\$(wx_top_builddir)/lib" WXCONFIG_RPATH="-Wl,+b,\$libdir" ;; @@ -4131,7 +4154,7 @@ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then WX_RESOURCES_MACOSX_DATA="libwx_${TOOLCHAIN_NAME}.${wx_release_number}.rsrc" dnl add the resources target for wxMac - LIBWXMACRES="\$(top_builddir)lib/${WX_RESOURCES_MACOSX_ASCII}" + LIBWXMACRES="\$(wx_top_builddir)/lib/${WX_RESOURCES_MACOSX_ASCII}" AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez) @@ -5646,13 +5669,14 @@ if test "$wxUSE_SOUND" = "yes"; then fi if test "$WXGTK20" = 1; then + PKG_PROG_PKG_CONFIG() + if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then PKG_CHECK_MODULES(LIBGNOMEPRINTUI, [libgnomeprintui-2.2 >= 2.8], [ -dnl EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS" CXXFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CXXFLAGS" AC_DEFINE(wxUSE_LIBGNOMEPRINT) ], @@ -5663,16 +5687,13 @@ dnl EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS" ) fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_MIMETYPE" = "yes" ; then if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then PKG_CHECK_MODULES(GNOMEVFS, [gnome-vfs-2.0 >= 2.0], [ -dnl EXTRALIBS_GNOMEVFS="$LIBGNOMEVFS_LIBS" CXXFLAGS="$GNOMEVFS_CFLAGS $CXXFLAGS" AC_DEFINE(wxUSE_LIBGNOMEVFS) ], @@ -5683,9 +5704,7 @@ dnl EXTRALIBS_GNOMEVFS="$LIBGNOMEVFS_LIBS" ) fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_LIBHILDON" = "yes" ; then PKG_CHECK_MODULES(HILDON, [hildon-lgpl >= 0.9], @@ -7409,7 +7428,7 @@ dnl come first and the one with setup.h should be before $(top_srcdir)/include dnl in case the latter contains setup.h used by non-autoconf makefiles (e.g. dnl CodeWarrior): CPPFLAGS=`echo $WXCONFIG_CPPFLAGS \ - -I\\${top_builddir}lib/wx/include/${TOOLCHAIN_FULLNAME} \ + -I\\${wx_top_builddir}/lib/wx/include/${TOOLCHAIN_FULLNAME} \ -I\\${top_srcdir}/include $TOOLKIT_INCLUDE \ $CPPFLAGS `