Update all of the .m4 files using Apple-shipped autoconf with a change to functions.m4 to make the output match what is currently ni the tree from VZ.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
File diff suppressed because it is too large
Load Diff
2048
build/autoconf_prepend-include/autoconf/functions.m4
Normal file
2048
build/autoconf_prepend-include/autoconf/functions.m4
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
# This file is part of Autoconf. -*- Autoconf -*-
|
# This file is part of Autoconf. -*- Autoconf -*-
|
||||||
# Checking for libraries.
|
# Checking for libraries.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||||
# 2002 Free Software Foundation, Inc.
|
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
# 02111-1307, USA.
|
# 02110-1301, USA.
|
||||||
|
|
||||||
# As a special exception, the Free Software Foundation gives unlimited
|
# As a special exception, the Free Software Foundation gives unlimited
|
||||||
# permission to copy, distribute and modify the configure scripts that
|
# permission to copy, distribute and modify the configure scripts that
|
||||||
@@ -67,24 +67,29 @@
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Search for a library defining FUNC, if it's not already available.
|
# Search for a library defining FUNC, if it's not already available.
|
||||||
AC_DEFUN([AC_SEARCH_LIBS],
|
AC_DEFUN([AC_SEARCH_LIBS],
|
||||||
[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
|
[AS_VAR_PUSHDEF([ac_Search], [ac_cv_search_$1])dnl
|
||||||
|
AC_CACHE_CHECK([for library containing $1], [ac_Search],
|
||||||
[ac_func_search_save_LIBS=$LIBS
|
[ac_func_search_save_LIBS=$LIBS
|
||||||
ac_cv_search_$1=no
|
AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])])
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
|
for ac_lib in '' $2; do
|
||||||
[ac_cv_search_$1="none required"])
|
if test -z "$ac_lib"; then
|
||||||
if test "$ac_cv_search_$1" = no; then
|
ac_res="none required"
|
||||||
for ac_lib in $2; do
|
else
|
||||||
|
ac_res=-l$ac_lib
|
||||||
LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
|
LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$1])],
|
fi
|
||||||
[ac_cv_search_$1="-l$ac_lib"
|
AC_LINK_IFELSE([], [AS_VAR_SET([ac_Search], [$ac_res])])
|
||||||
break])
|
AS_VAR_SET_IF([ac_Search], [break])dnl
|
||||||
done
|
done
|
||||||
fi
|
AS_VAR_SET_IF([ac_Search], , [AS_VAR_SET([ac_Search], [no])])dnl
|
||||||
|
rm conftest.$ac_ext
|
||||||
LIBS=$ac_func_search_save_LIBS])
|
LIBS=$ac_func_search_save_LIBS])
|
||||||
AS_IF([test "$ac_cv_search_$1" != no],
|
ac_res=AS_VAR_GET([ac_Search])
|
||||||
[test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
|
AS_IF([test "$ac_res" != no],
|
||||||
|
[test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||||
$3],
|
$3],
|
||||||
[$4])dnl
|
[$4])dnl
|
||||||
|
AS_VAR_POPDEF([ac_Search])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -118,14 +123,14 @@ AC_DEFUN([AC_CHECK_LIB],
|
|||||||
AS_LITERAL_IF([$1],
|
AS_LITERAL_IF([$1],
|
||||||
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
|
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
|
||||||
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
|
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
|
||||||
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
|
AC_CACHE_CHECK([for $2 in -l$1], [ac_Lib],
|
||||||
[ac_check_lib_save_LIBS=$LIBS
|
[ac_check_lib_save_LIBS=$LIBS
|
||||||
LIBS="-l$1 $5 $LIBS"
|
LIBS="-l$1 $5 $LIBS"
|
||||||
AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
|
AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
|
||||||
[AS_VAR_SET(ac_Lib, yes)],
|
[AS_VAR_SET([ac_Lib], [yes])],
|
||||||
[AS_VAR_SET(ac_Lib, no)])
|
[AS_VAR_SET([ac_Lib], [no])])
|
||||||
LIBS=$ac_check_lib_save_LIBS])
|
LIBS=$ac_check_lib_save_LIBS])
|
||||||
AS_IF([test AS_VAR_GET(ac_Lib) = yes],
|
AS_IF([test AS_VAR_GET([ac_Lib]) = yes],
|
||||||
[m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
|
[m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
|
||||||
LIBS="-l$1 $LIBS"
|
LIBS="-l$1 $LIBS"
|
||||||
])],
|
])],
|
||||||
@@ -137,8 +142,8 @@ AS_VAR_POPDEF([ac_Lib])dnl
|
|||||||
# AH_CHECK_LIB(LIBNAME)
|
# AH_CHECK_LIB(LIBNAME)
|
||||||
# ---------------------
|
# ---------------------
|
||||||
m4_define([AH_CHECK_LIB],
|
m4_define([AH_CHECK_LIB],
|
||||||
[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1),
|
[AH_TEMPLATE(AS_TR_CPP([HAVE_LIB$1]),
|
||||||
[Define to 1 if you have the `]$1[' library (-l]$1[).])])
|
[Define to 1 if you have the `$1' library (-l$1).])])
|
||||||
|
|
||||||
|
|
||||||
# AC_HAVE_LIBRARY(LIBRARY,
|
# AC_HAVE_LIBRARY(LIBRARY,
|
||||||
@@ -180,21 +185,27 @@ m4_popdef([AC_Lib_Name])dnl
|
|||||||
# Internal subroutine of _AC_PATH_X.
|
# Internal subroutine of _AC_PATH_X.
|
||||||
# Set ac_x_includes and/or ac_x_libraries.
|
# Set ac_x_includes and/or ac_x_libraries.
|
||||||
m4_define([_AC_PATH_X_XMKMF],
|
m4_define([_AC_PATH_X_XMKMF],
|
||||||
[rm -fr conftest.dir
|
[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
|
||||||
|
rm -f -r conftest.dir
|
||||||
if mkdir conftest.dir; then
|
if mkdir conftest.dir; then
|
||||||
cd conftest.dir
|
cd conftest.dir
|
||||||
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
|
|
||||||
cat >Imakefile <<'_ACEOF'
|
cat >Imakefile <<'_ACEOF'
|
||||||
acfindx:
|
incroot:
|
||||||
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
|
@echo incroot='${INCROOT}'
|
||||||
|
usrlibdir:
|
||||||
|
@echo usrlibdir='${USRLIBDIR}'
|
||||||
|
libdir:
|
||||||
|
@echo libdir='${LIBDIR}'
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
|
||||||
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
||||||
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
|
for ac_var in incroot usrlibdir libdir; do
|
||||||
|
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
|
||||||
|
done
|
||||||
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl; do
|
||||||
if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
|
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
|
||||||
test -f $ac_im_libdir/libX11.$ac_extension; then
|
test -f "$ac_im_libdir/libX11.$ac_extension"; then
|
||||||
ac_im_usrlibdir=$ac_im_libdir; break
|
ac_im_usrlibdir=$ac_im_libdir; break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -202,7 +213,7 @@ _ACEOF
|
|||||||
# bogus both because they are the default anyway, and because
|
# bogus both because they are the default anyway, and because
|
||||||
# using them would break gcc on systems where it needs fixed includes.
|
# using them would break gcc on systems where it needs fixed includes.
|
||||||
case $ac_im_incroot in
|
case $ac_im_incroot in
|
||||||
/usr/include) ;;
|
/usr/include) ac_x_includes= ;;
|
||||||
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
|
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
|
||||||
esac
|
esac
|
||||||
case $ac_im_usrlibdir in
|
case $ac_im_usrlibdir in
|
||||||
@@ -211,7 +222,7 @@ _ACEOF
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
rm -fr conftest.dir
|
rm -f -r conftest.dir
|
||||||
fi
|
fi
|
||||||
])# _AC_PATH_X_XMKMF
|
])# _AC_PATH_X_XMKMF
|
||||||
|
|
||||||
@@ -259,13 +270,13 @@ ac_x_header_dirs='
|
|||||||
/usr/openwin/share/include'
|
/usr/openwin/share/include'
|
||||||
|
|
||||||
if test "$ac_x_includes" = no; then
|
if test "$ac_x_includes" = no; then
|
||||||
# Guess where to find include files, by looking for a specified header file.
|
# Guess where to find include files, by looking for Xlib.h.
|
||||||
# First, try using that file with no special directory specified.
|
# First, try using that file with no special directory specified.
|
||||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Intrinsic.h>])],
|
AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
|
||||||
[# We can compile using X headers with no special include directory.
|
[# We can compile using X headers with no special include directory.
|
||||||
ac_x_includes=],
|
ac_x_includes=],
|
||||||
[for ac_dir in $ac_x_header_dirs; do
|
[for ac_dir in $ac_x_header_dirs; do
|
||||||
if test -r "$ac_dir/X11/Intrinsic.h"; then
|
if test -r "$ac_dir/X11/Xlib.h"; then
|
||||||
ac_x_includes=$ac_dir
|
ac_x_includes=$ac_dir
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -277,9 +288,9 @@ if test "$ac_x_libraries" = no; then
|
|||||||
# See if we find them without any special options.
|
# See if we find them without any special options.
|
||||||
# Don't add to $LIBS permanently.
|
# Don't add to $LIBS permanently.
|
||||||
ac_save_LIBS=$LIBS
|
ac_save_LIBS=$LIBS
|
||||||
LIBS="-lXt $LIBS"
|
LIBS="-lX11 $LIBS"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Intrinsic.h>],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
|
||||||
[XtMalloc (0)])],
|
[XrmInitialize ()])],
|
||||||
[LIBS=$ac_save_LIBS
|
[LIBS=$ac_save_LIBS
|
||||||
# We can link X programs with no special library path.
|
# We can link X programs with no special library path.
|
||||||
ac_x_libraries=],
|
ac_x_libraries=],
|
||||||
@@ -288,7 +299,7 @@ for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
|
|||||||
do
|
do
|
||||||
# Don't even attempt the hair of trying to link an X program!
|
# Don't even attempt the hair of trying to link an X program!
|
||||||
for ac_extension in a so sl; do
|
for ac_extension in a so sl; do
|
||||||
if test -r $ac_dir/libXt.$ac_extension; then
|
if test -r "$ac_dir/libX11.$ac_extension"; then
|
||||||
ac_x_libraries=$ac_dir
|
ac_x_libraries=$ac_dir
|
||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
@@ -307,14 +318,16 @@ AC_DEFUN([_AC_PATH_X],
|
|||||||
ac_x_includes=no ac_x_libraries=no
|
ac_x_includes=no ac_x_libraries=no
|
||||||
_AC_PATH_X_XMKMF
|
_AC_PATH_X_XMKMF
|
||||||
_AC_PATH_X_DIRECT
|
_AC_PATH_X_DIRECT
|
||||||
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
|
case $ac_x_includes,$ac_x_libraries in #(
|
||||||
# Didn't find X anywhere. Cache the known absence of X.
|
no,* | *,no | *\'*)
|
||||||
ac_cv_have_x="have_x=no"
|
# Didn't find X, or a directory has "'" in its name.
|
||||||
else
|
ac_cv_have_x="have_x=no";; #(
|
||||||
|
*)
|
||||||
# Record where we found X for the cache.
|
# Record where we found X for the cache.
|
||||||
ac_cv_have_x="have_x=yes \
|
ac_cv_have_x="have_x=yes\
|
||||||
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
|
ac_x_includes='$ac_x_includes'\
|
||||||
fi])dnl
|
ac_x_libraries='$ac_x_libraries'"
|
||||||
|
esac])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -331,23 +344,19 @@ m4_divert_once([HELP_BEGIN], [
|
|||||||
X features:
|
X features:
|
||||||
--x-includes=DIR X include files are in DIR
|
--x-includes=DIR X include files are in DIR
|
||||||
--x-libraries=DIR X library files are in DIR])dnl
|
--x-libraries=DIR X library files are in DIR])dnl
|
||||||
|
AC_MSG_CHECKING([for X])
|
||||||
|
|
||||||
if test "x$ac_path_x_has_been_run" != xyes; then
|
|
||||||
AC_MSG_CHECKING([for X])
|
|
||||||
|
|
||||||
ac_path_x_has_been_run=yes
|
|
||||||
AC_ARG_WITH(x, [ --with-x use the X Window System])
|
AC_ARG_WITH(x, [ --with-x use the X Window System])
|
||||||
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
|
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
|
||||||
if test "x$with_x" = xno; then
|
if test "x$with_x" = xno; then
|
||||||
# The user explicitly disabled X.
|
# The user explicitly disabled X.
|
||||||
have_x=disabled
|
have_x=disabled
|
||||||
else
|
else
|
||||||
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
|
case $x_includes,$x_libraries in #(
|
||||||
# Both variables are already set.
|
*\'*) AC_MSG_ERROR([Cannot use X directory names containing ']);; #(
|
||||||
have_x=yes
|
*,NONE | NONE,*) _AC_PATH_X;; #(
|
||||||
else
|
*) have_x=yes;;
|
||||||
_AC_PATH_X
|
esac
|
||||||
fi
|
|
||||||
eval "$ac_cv_have_x"
|
eval "$ac_cv_have_x"
|
||||||
fi # $with_x != no
|
fi # $with_x != no
|
||||||
|
|
||||||
@@ -359,16 +368,12 @@ else
|
|||||||
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
|
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
|
||||||
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
|
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
|
||||||
# Update the cache value to reflect the command line values.
|
# Update the cache value to reflect the command line values.
|
||||||
ac_cv_have_x="have_x=yes \
|
ac_cv_have_x="have_x=yes\
|
||||||
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
|
ac_x_includes='$x_includes'\
|
||||||
# It might be that x_includes is empty (headers are found in the
|
ac_x_libraries='$x_libraries'"
|
||||||
# standard search path. Then output the corresponding message
|
AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
|
||||||
ac_out_x_includes=$x_includes
|
|
||||||
test "x$x_includes" = x && ac_out_x_includes="in standard search path"
|
|
||||||
AC_MSG_RESULT([libraries $x_libraries, headers $ac_out_x_includes])
|
|
||||||
fi
|
fi
|
||||||
|
])# AC_PATH_X
|
||||||
fi])# AC_PATH_X
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -390,29 +395,22 @@ else
|
|||||||
# It would also be nice to do this for all -L options, not just this one.
|
# It would also be nice to do this for all -L options, not just this one.
|
||||||
if test -n "$x_libraries"; then
|
if test -n "$x_libraries"; then
|
||||||
X_LIBS="$X_LIBS -L$x_libraries"
|
X_LIBS="$X_LIBS -L$x_libraries"
|
||||||
dnl FIXME: banish uname from this macro!
|
|
||||||
# For Solaris; some versions of Sun CC require a space after -R and
|
# For Solaris; some versions of Sun CC require a space after -R and
|
||||||
# others require no space. Words are not sufficient . . . .
|
# others require no space. Words are not sufficient . . . .
|
||||||
case `(uname -sr) 2>/dev/null` in
|
|
||||||
"SunOS 5"*)
|
|
||||||
AC_MSG_CHECKING([whether -R must be followed by a space])
|
AC_MSG_CHECKING([whether -R must be followed by a space])
|
||||||
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
|
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_nospace=yes, ac_R_nospace=no)
|
ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag
|
||||||
if test $ac_R_nospace = yes; then
|
ac_[]_AC_LANG_ABBREV[]_werror_flag=yes
|
||||||
AC_MSG_RESULT([no])
|
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||||
X_LIBS="$X_LIBS -R$x_libraries"
|
[AC_MSG_RESULT([no])
|
||||||
else
|
X_LIBS="$X_LIBS -R$x_libraries"],
|
||||||
LIBS="$ac_xsave_LIBS -R $x_libraries"
|
[LIBS="$ac_xsave_LIBS -R $x_libraries"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_space=yes, ac_R_space=no)
|
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||||
if test $ac_R_space = yes; then
|
[AC_MSG_RESULT([yes])
|
||||||
AC_MSG_RESULT([yes])
|
X_LIBS="$X_LIBS -R $x_libraries"],
|
||||||
X_LIBS="$X_LIBS -R $x_libraries"
|
[AC_MSG_RESULT([neither works])])])
|
||||||
else
|
ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag
|
||||||
AC_MSG_RESULT([neither works])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
LIBS=$ac_xsave_LIBS
|
LIBS=$ac_xsave_LIBS
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for system-dependent libraries X programs must link with.
|
# Check for system-dependent libraries X programs must link with.
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user