X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6054113a5090e99caf9ddc29c50f83adf9d3c5be..180db9083613b9b6eca8451ee19553c6581f5505:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index 158eee817d..7aafc547e2 100644 --- a/configure.in +++ b/configure.in @@ -370,6 +370,8 @@ WX_RELEASE_NUMBER=2 WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER +WX_MSW_VERSION=$WX_MAJOR_VERSION_NUMBER$WX_MINOR_VERSION_NUMBER$WX_RELEASE_NUMBER + WX_CURRENT=1 WX_REVISION=0 WX_AGE=0 @@ -1461,11 +1463,12 @@ dnl defines INSTALL with the appropriate command AC_PROG_INSTALL case "${host}" in - dnl The other BSD's should probably go in here too, since this is - dnl to workaround a strange static lib BSDism. + dnl The other BSD's should probably go in here too, since this is + dnl to workaround a strange static lib BSDism. + dnl Mac OS X install seems to ignore -p option... powerpc-*-darwin* ) - INSTALL_PROGRAM="$INSTALL_PROGRAM -p" - INSTALL_DATA="$INSTALL_DATA -p" + INSTALL_PROGRAM="cp -fp" + INSTALL_DATA="cp -fp" ;; *) ;; @@ -1948,7 +1951,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl stupid GTK+ AM macros produce their own messages, so we dnl have to pass to the next line gtk_version_cached=0 - AC_MSG_RESULT("") + AC_MSG_RESULT() wx_cv_lib_gtk= if test "x$wxUSE_GTK2" = "xyes"; then @@ -2024,12 +2027,14 @@ equivalent variable and GTK+ is version 1.2.3 or above. mgl_lib_type="" if test "$wxUSE_DEBUG_FLAG" = yes ; then - if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a ; then + if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \ + -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then mgl_lib_type=debug fi fi if test "x$mgl_lib_type" = x ; then - if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a ; then + if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \ + -f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then mgl_lib_type=release else AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.]) @@ -2365,17 +2370,6 @@ dnl library link name WX_LIBRARY="wx_${TOOLCHAIN_NAME}" WX_LIBRARY_GL="wx_${TOOLCHAIN_NAME_GL}" -dnl define which libs wx-config should link. -WXCONFIG_LIBS="-l${WX_LIBRARY}" - -if test "$wxUSE_OPENGL" = "yes"; then - WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS" -fi - -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}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" @@ -2390,6 +2384,39 @@ dnl the name of the resources file for wxMac WX_RESOURCES_MACOSX="lib${WX_LIBRARY}.rsrc" WX_RESOURCES_MACOSX_COMPILED="lib${WX_LIBRARY}.r" +case "${host}" in + *-*-cygwin* | *-*-mingw32* ) + + dnl If we are cross compiling we want to use the 'full' unix type name for the + dnl lib, but for a native install use the windows style naming convention. + dnl (excepting again that we strip the ELF style version numbers off it). + + dnl FIXME: is this GL stuff actually even used for wxMSW? should it be?? + + if test "$cross_compiling" != "yes"; then + WX_LIBRARY="wxmsw${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}" + WX_LIBRARY_GL="wxmsw_gl${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}" + WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}" + WX_LIBRARY_NAME_SHARED_GL="${WX_LIBRARY_GL}.${SO_SUFFIX}" + else + WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}" + WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}" + fi + +esac + +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 define which libs wx-config should link. +WXCONFIG_LIBS="-l${WX_LIBRARY}" + +if test "$wxUSE_OPENGL" = "yes"; then + WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS" +fi + + dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP --- if test "$wxUSE_SHARED" = "yes"; then @@ -2484,42 +2511,21 @@ if test "$wxUSE_SHARED" = "yes"; then ;; *-*-cygwin* | *-*-mingw32* ) - dnl If we are cross compiling we want to use the 'full' unix type name for the - dnl lib, but for a native install use the windows style naming convention. - - if test "$cross_compiling" != "yes"; then - WX_LIBRARY="wxmsw${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}${WX_RELEASE_NUMBER}${lib_unicode_suffix}${lib_debug_suffix}" - WX_LIBRARY_GL=${WX_LIBRARY} "wxmsw${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}${WX_RELEASE_NUMBER}${lib_unicode_suffix}${lib_debug_suffix}" - WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}" - WX_LIBRARY_NAME_SHARED_GL="${WX_LIBRARY_GL}.${SO_SUFFIX}" - WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a" - WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a" - fi - WX_LIBRARY_IMPORTLIB="lib${WX_LIBRARY}.lib" - - dnl FIXME: this is a hack.. do we need a --static flag to wx-config? - if test "$wxUSE_SHARED" = "yes" ; then - WXCONFIG_LIBS="${WX_LIBRARY_IMPORTLIB}" - else - WXCONFIG_LIBS="-l${WX_LIBRARY}" - fi + WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a" SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o" TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXUSINGDLL=1" - WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" + + PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" dnl install shared libs without symlinks if test "$wxUSE_OPENGL" = "yes"; then WX_ALL_INSTALLED="preinstall_gl" - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" else - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC}" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" fi - dnl -fPIC is not required for mingw build -- all code is already - dnl position independent. Because of this we can (and do) build - dnl a static lib from the same object files as the dll. - PIC_FLAG= ;; *-pc-os2_emx | *-pc-os2-emx ) @@ -2643,9 +2649,18 @@ dnl defines uid_t and gid_t if not already defined AC_TYPE_UID_T dnl check for wchar_t +dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD) AC_CACHE_CHECK([for wchar_t], wx_cv_type_wchar_t, [ - AC_TRY_COMPILE([#include ], + AC_TRY_COMPILE( + [ + #ifdef HAVE_WCHAR_H + # include + #endif + #ifdef HAVE_STDLIB_H + # include + #endif + ], [ wchar_t wc, *ws; wc = L'a'; @@ -2757,7 +2772,7 @@ AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long long, 0) dnl we have to do it ourselves because SGI/Irix's stdio.h does not include -dnl wchar_t an AC_CHECK_SIZEOF only includes stdio.h +dnl wchar_t and AC_CHECK_SIZEOF only includes stdio.h dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD) AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t, [ @@ -4748,7 +4763,6 @@ AC_SUBST(OPENGL_LIBS) AC_SUBST(EXTRADEFS) AC_SUBST(LIBS) AC_SUBST(LD_LIBS) -AC_SUBST(WXMSW_DLL_DEFINES) dnl additional resurces settings AC_SUBST(RESCOMP)