Skip to content

Commit 253ec69

Browse files
committed
Fix php#9483: Fix autoconf warnings due to old libtool
1 parent 37e6594 commit 253ec69

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

build/libtool.m4

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ $rm -r conftest*
271271

272272
dnl autoconf 2.13 compatibility
273273
dnl _LT_AC_TRY_LINK()
274-
AC_DEFUN(_LT_AC_TRY_LINK, [
274+
AC_DEFUN([_LT_AC_TRY_LINK], [
275275
cat > conftest.$ac_ext <<EOF
276276
dnl This sometimes fails to find confdefs.h, for some reason.
277277
dnl [#]line __oline__ "[$]0"
@@ -675,10 +675,9 @@ s390*-*linux*|sparc*-*linux*)
675675
SAVE_CFLAGS="$CFLAGS"
676676
CFLAGS="$CFLAGS -belf"
677677
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
678-
[AC_LANG_SAVE
679-
AC_LANG_C
680-
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
681-
AC_LANG_RESTORE])
678+
[AC_LANG_PUSH([C])
679+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
680+
AC_LANG_POP([C])])
682681
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
683682
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
684683
CFLAGS="$SAVE_CFLAGS"
@@ -1197,7 +1196,7 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks"
11971196
ln conftest.a conftest.b 2>/dev/null && hard_links=no
11981197
AC_MSG_RESULT([$hard_links])
11991198
if test "$hard_links" = no; then
1200-
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1199+
AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
12011200
need_locks=warn
12021201
fi
12031202
else
@@ -1935,15 +1934,15 @@ AC_ARG_WITH([tags],
19351934
19361935
if test -f "$ltmain" && test -n "$tagnames"; then
19371936
if test ! -f "${ofile}"; then
1938-
AC_MSG_WARN([output file \`$ofile' does not exist])
1937+
AC_MSG_WARN([output file '$ofile' does not exist])
19391938
fi
19401939
19411940
if test -z "$LTCC"; then
19421941
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
19431942
if test -z "$LTCC"; then
1944-
AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
1943+
AC_MSG_WARN([output file '$ofile' does not look like a libtool script])
19451944
else
1946-
AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
1945+
AC_MSG_WARN([using 'LTCC=$LTCC', extracted from '$ofile'])
19471946
fi
19481947
fi
19491948
if test -z "$LTCFLAGS"; then
@@ -1966,7 +1965,7 @@ if test -f "$ltmain" && test -n "$tagnames"; then
19661965
19671966
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
19681967
then
1969-
AC_MSG_ERROR([tag name \"$tagname\" already exists])
1968+
AC_MSG_ERROR([tag name "$tagname" already exists])
19701969
fi
19711970
19721971
# Update the list of available tags.
@@ -2738,8 +2737,7 @@ fi
27382737
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
27392738
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
27402739
[lt_save_CC="$CC"
2741-
AC_LANG_SAVE
2742-
AC_LANG_C
2740+
AC_LANG_PUSH([C])
27432741
27442742
# Source file extension for C test sources.
27452743
ac_ext=c
@@ -2807,7 +2805,7 @@ AC_MSG_RESULT([$enable_static])
28072805
28082806
AC_LIBTOOL_CONFIG($1)
28092807
2810-
AC_LANG_RESTORE
2808+
AC_LANG_POP([C])
28112809
CC="$lt_save_CC"
28122810
])# AC_LIBTOOL_LANG_C_CONFIG
28132811

@@ -2819,8 +2817,7 @@ CC="$lt_save_CC"
28192817
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
28202818
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
28212819
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2822-
[AC_LANG_SAVE
2823-
AC_LANG_CPLUSPLUS
2820+
[AC_LANG_PUSH([C++])
28242821
AC_REQUIRE([AC_PROG_CXX])
28252822
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
28262823
@@ -3806,7 +3803,7 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
38063803
38073804
AC_LIBTOOL_CONFIG($1)
38083805
3809-
AC_LANG_RESTORE
3806+
AC_LANG_POP([C++])
38103807
CC=$lt_save_CC
38113808
LDCXX=$LD
38123809
LD=$lt_save_LD

0 commit comments

Comments
 (0)