1. moved the test for glibc >= 2.1 after AC_PROG_CC
2. fixed this test so the result is realyl cached 3. added test for fnmatch() because when cross-compiling we can find fnmatch.h but fnmatch() could still be unaccessible git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
51
configure.in
51
configure.in
@@ -286,28 +286,6 @@ if test "$USE_UNIX" = 1 ; then
|
|||||||
AC_DEFINE(__UNIX__)
|
AC_DEFINE(__UNIX__)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl check for glibc version
|
|
||||||
if test "$USE_LINUX" = 1; then
|
|
||||||
AC_CACHE_CHECK([for glibc 2.1 or later], wx_lib_glibc21,[
|
|
||||||
AC_TRY_COMPILE([#include <features.h>],
|
|
||||||
[
|
|
||||||
#if !__GLIBC_PREREQ(2, 1)
|
|
||||||
#error not glibc2.1
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[
|
|
||||||
wx_lib_glibc21=yes
|
|
||||||
],
|
|
||||||
[
|
|
||||||
wx_lib_glibc21=no
|
|
||||||
]
|
|
||||||
)
|
|
||||||
])
|
|
||||||
if test "$wx_lib_glibc21" = "yes"; then
|
|
||||||
AC_DEFINE(wxHAVE_GLIBC2)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl command line options for configure
|
dnl command line options for configure
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
@@ -1384,6 +1362,28 @@ dnl ------------------------------------------------------------------------
|
|||||||
dnl flush the cache because checking for libraries below might abort
|
dnl flush the cache because checking for libraries below might abort
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
dnl check for glibc version
|
||||||
|
if test "$USE_LINUX" = 1; then
|
||||||
|
AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[
|
||||||
|
AC_TRY_COMPILE([#include <features.h>],
|
||||||
|
[
|
||||||
|
#if !__GLIBC_PREREQ(2, 1)
|
||||||
|
#error not glibc2.1
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[
|
||||||
|
wx_cv_lib_glibc21=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
wx_cv_lib_glibc21=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
if test "$wx_cv_lib_glibc21" = "yes"; then
|
||||||
|
AC_DEFINE(wxHAVE_GLIBC2)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Optional libraries
|
dnl Optional libraries
|
||||||
dnl
|
dnl
|
||||||
@@ -2582,6 +2582,11 @@ dnl AC_CHECK_HEADERS(wctype.h)
|
|||||||
|
|
||||||
dnl defines HAVE_FNMATCH_H
|
dnl defines HAVE_FNMATCH_H
|
||||||
AC_CHECK_HEADERS(fnmatch.h)
|
AC_CHECK_HEADERS(fnmatch.h)
|
||||||
|
|
||||||
|
if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
|
||||||
|
AC_CHECK_FUNCS(fnmatch)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
|
dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
|
||||||
AC_CHECK_HEADERS(langinfo.h)
|
AC_CHECK_HEADERS(langinfo.h)
|
||||||
|
|
||||||
@@ -3359,7 +3364,7 @@ if test "$TOOLKIT" != "MSW"; then
|
|||||||
dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining
|
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 this disables _BSD_SOURCE which breaks libtiff compilation, so it is
|
||||||
dnl simpler to just define _GNU_SOURCE to get everything)
|
dnl simpler to just define _GNU_SOURCE to get everything)
|
||||||
if test "x$wx_lib_glibc21" = "xyes"; then
|
if test "x$wx_cv_lib_glibc21" = "xyes"; then
|
||||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user