X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab252f7b29379d786302b563f97cb8d0ee2a1246..f9a3f576cccfd2c2296a24d74b05b9543c47fac7:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index 68f6bf63fb..38b5e11961 100644 --- a/configure.in +++ b/configure.in @@ -589,7 +589,7 @@ fi dnl check for glibc version if test "$USE_LINUX" = 1; then - AC_CACHE_CHECK([for glibc version], wx_lib_glibc21, + AC_CACHE_CHECK([for glibc 2.1 or later], wx_lib_glibc21, AC_TRY_COMPILE([#include ], [ #if !__GLIBC_PREREQ(2, 1) @@ -597,18 +597,16 @@ if test "$USE_LINUX" = 1; then #endif ], [ - AC_MSG_RESULT(2.1 or later), wx_lib_glibc21=yes ], [ - AC_MSG_RESULT(less than 2.1), wx_lib_glibc21=no ] ) ) if test "$wx_lib_glibc21" = "yes"; then - AC_DEFINE(wxHAVE_GLIBC2)) + AC_DEFINE(wxHAVE_GLIBC2) fi fi @@ -2307,9 +2305,8 @@ if test "$wxUSE_SHARED" = "yes"; then fi ;; *-*-darwin* ) - TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__" - CFLAGS="${CFLAGS} -fno-common" - CPPFLAGS="${CPPFLAGS} -fno-common" + TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__" + CPPFLAGS="${CPPFLAGS} -fno-common" SHARED_LD="${CXX} -dynamiclib -o" PIC_FLAG="-dynamic -fPIC" if test "$wxUSE_OPENGL" = "yes"; then @@ -2320,9 +2317,9 @@ if test "$wxUSE_SHARED" = "yes"; then WX_ALL="CREATE_LINKS" fi dnl add the resources target for wxMac - if test "$wxUSE_MAC" = 1 ; then - WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r" - fi + if test "$wxUSE_MAC" = 1 ; then + WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r" + fi dnl the name of the shared library WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" @@ -3074,10 +3071,12 @@ if test "$wxUSE_THREADS" = "yes" ; then dnl defined, we do it by directly assigned dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr - dnl we need to define _XOPEN_SOURCE=500 to get PTHREAD_MUTEX_RECURSIVE - dnl with glibc 2.1+, it probably shouldn't hurt elsewhere? + dnl we need _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ + dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining + dnl this disables _BSD_SOURCE which breaks libtiff compilation, so it is + dnl simpler to just define _GNU_SOURCE to get everything) if test "x$wx_lib_glibc21" = "xyes"; then - CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" fi AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t, @@ -3124,7 +3123,7 @@ if test "$wxUSE_THREADS" = "yes" ; then dnl building MT programs under Solaris with the native compiler requires -mt dnl switch if test "$USE_SOLARIS" = "yes" -a "$GCC" != "yes"; then - CFLAGS="${CFLAGS} -mt" + CPPFLAGS="${CFLAGS} -mt" CXXFLAGS="${CXXFLAGS} -mt" LDFLAGS="${LDFLAGS} -mt" fi @@ -3138,8 +3137,7 @@ if test "$wxUSE_THREADS" = "yes"; then dnl must define _REENTRANT for multithreaded code except for Darwin/Mac OS X if test "$USE_DARWIN" != 1; then - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CPPFLAGS="${CPPFLAGS} -D_REENTRANT" fi SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" @@ -3149,8 +3147,7 @@ else 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" + CPPFLAGS="${CPPFLAGS} -D_REENTRANT" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -3177,8 +3174,8 @@ fi if test "$wxUSE_MAC" = 1 ; then TOOLKIT_DEF="${TOOLKIT_DEF} -DTARGET_CARBON" - CFLAGS="${CFLAGS} -fpascal-strings" - CPPFLAGS="${CPPFLAGS} -cpp-precomp -fpascal-strings" + CPPFLAGS="${CPPFLAGS} -fpascal-strings" + CXXFLAGS="${CXXFLAGS} -cpp-precomp" AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez) RESCOMP=${REZ} @@ -3679,8 +3676,7 @@ if test "$wxUSE_DATETIME" = "yes"; then ], [ struct timeval tv; - struct timezone tz; - gettimeofday(&tv, &tz); + gettimeofday(&tv, NULL); ], wx_cv_func_gettimeofday_has_2_args=yes, AC_TRY_COMPILE( @@ -3693,7 +3689,10 @@ if test "$wxUSE_DATETIME" = "yes"; then gettimeofday(&tv); ], wx_cv_func_gettimeofday_has_2_args=no, - wx_cv_func_gettimeofday_has_2_args=unknown + [ + AC_MSG_WARN([failed to determine number of gettimeofday() arguments]) + wx_cv_func_gettimeofday_has_2_args=unknown + ] ) ) AC_LANG_RESTORE @@ -4509,6 +4508,18 @@ fi AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO) +dnl --------------------------------------------------------------------------- +dnl define the variable containing the installation prefix (used in dcpsg.cpp) +dnl --------------------------------------------------------------------------- + +if test "x$prefix" != "xNONE"; then + wxPREFIX=$prefix +else + wxPREFIX=$ac_default_prefix +fi + +AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX") + dnl --------------------------------------------------------------------------- dnl Output the makefiles and such from the results found above dnl ---------------------------------------------------------------------------