minor fixes:
1. removed "We already do it" as "We" is not a valid shell command :-) 2. define _GNU_SOURCE in setup.h and not in the compiler flags 3. allow to build with GTK2 without pangoft2 (and without printing then) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
43
configure.in
43
configure.in
@@ -1543,7 +1543,7 @@ AC_CACHE_SAVE
|
|||||||
dnl check for glibc version
|
dnl check for glibc version
|
||||||
dnl
|
dnl
|
||||||
dnl VZ: I have no idea why had this check been there originally, but now
|
dnl VZ: I have no idea why had this check been there originally, but now
|
||||||
dnl it is only used to get the recursive mutexes under Linux
|
dnl we could probably do without it by just always adding _GNU_SOURCE
|
||||||
if test "$USE_LINUX" = 1; then
|
if test "$USE_LINUX" = 1; then
|
||||||
AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
|
AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
|
||||||
AC_TRY_COMPILE([#include <features.h>],
|
AC_TRY_COMPILE([#include <features.h>],
|
||||||
@@ -1565,6 +1565,20 @@ if test "$USE_LINUX" = 1; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl we may need _GNU_SOURCE for 2 things:
|
||||||
|
dnl
|
||||||
|
dnl 1. to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ (strictly speaking we
|
||||||
|
dnl only need _XOPEN_SOURCE=500 but just defining this disables _BSD_SOURCE
|
||||||
|
dnl which breaks libtiff compilation, so it is simpler to just define
|
||||||
|
dnl _GNU_SOURCE to get everything)
|
||||||
|
dnl
|
||||||
|
dnl 2. for Unicode functions
|
||||||
|
if test "x$wx_cv_lib_glibc21" = "xyes"; then
|
||||||
|
if test "$wxUSE_UNICODE" = "yes" -o "$wxUSE_THREADS" = "yes"; then
|
||||||
|
AC_DEFINE(_GNU_SOURCE)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Optional libraries
|
dnl Optional libraries
|
||||||
dnl
|
dnl
|
||||||
@@ -1900,9 +1914,16 @@ if test "$wxUSE_GUI" = "yes"; then
|
|||||||
AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
|
AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES)
|
||||||
|
|
||||||
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
|
if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
|
||||||
PKG_CHECK_MODULES(PANGOFT2, pangoft2)
|
PKG_CHECK_MODULES(PANGOFT2, pangoft2,
|
||||||
CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
|
[
|
||||||
LIBS="$LIBS $PANGOFT2_LIBS"
|
CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
|
||||||
|
LIBS="$LIBS $PANGOFT2_LIBS"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
|
||||||
|
wxUSE_PRINTING_ARCHITECTURE="no"
|
||||||
|
]
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -3458,16 +3479,6 @@ if test "$TOOLKIT" != "MSW"; then
|
|||||||
dnl defined, we do it by directly assigned
|
dnl defined, we do it by directly assigned
|
||||||
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
We define this already somewhere else
|
|
||||||
if test "x$wx_cv_lib_glibc21" = "xyes"; then
|
|
||||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
||||||
[
|
[
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
AC_TRY_COMPILE([#include <pthread.h>],
|
||||||
@@ -3580,10 +3591,6 @@ if test "$wxUSE_PROFILE" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CODE_GEN_FLAGS=
|
CODE_GEN_FLAGS=
|
||||||
if test "$GCC" = "yes" ; then
|
|
||||||
CODE_GEN_FLAGS="$CODE_GEN_FLAGS -D_GNU_SOURCE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CODE_GEN_FLAGS_CXX=
|
CODE_GEN_FLAGS_CXX=
|
||||||
if test "$GCC" = "yes" ; then
|
if test "$GCC" = "yes" ; then
|
||||||
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
if test "$wxUSE_NO_RTTI" = "yes" ; then
|
||||||
|
@@ -42,6 +42,9 @@
|
|||||||
/* Define if you have the ANSI C header files. */
|
/* Define if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define this to get extra features from GNU libc. */
|
||||||
|
#undef _GNU_SOURCE
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
#undef uid_t
|
#undef uid_t
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user