mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
Fix autoconf obsolete macros
autogen.sh is reporting some warnings as below ./autogen.sh 2>&1 |grep "obsolete" libtoolize: copying file 'm4/lt~obsolete.m4' configure.ac:115: warning: The macro `AC_LANG_C' is obsolete. configure.ac:115: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:134: warning: The macro `AC_LANG_C' is obsolete. configure.ac:134: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:135: warning: The macro `AC_LANG_C' is obsolete. configure.ac:135: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:146: warning: The macro `AC_LANG_C' is obsolete. configure.ac:146: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:146: warning: The macro `AC_LANG_C' is obsolete. configure.ac:146: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:373: warning: The macro `AC_LANG_C' is obsolete. configure.ac:373: warning: The macro `AC_TRY_COMPILE' is obsolete. configure.ac:458: warning: The macro `AC_HEADER_TIME' is obsolete. configure.ac:681: warning: The macro `AC_TRY_LINK' is obsolete. configure.ac:807: warning: The macro `AC_TRY_LINK' is obsolete. As the minimum autoconf version required is v2.69, we need to make sure to update obsolete macros as described at https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
This commit is contained in:
committed by
Carlos R. Mafra
parent
215b6ee2e6
commit
a52d13c8b8
@@ -455,7 +455,6 @@ AC_CHECK_HEADERS([syslog.h], [AC_DEFINE([HAVE_SYSLOG], [1], [Check for syslog])]
|
||||
dnl Checks for header files
|
||||
dnl =======================
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h libintl.h poll.h malloc.h ctype.h \
|
||||
string.h strings.h)
|
||||
|
||||
|
||||
@@ -80,14 +80,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
|
||||
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
@@ -116,14 +116,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$2])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LANG(C++)
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
|
||||
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
@@ -151,14 +151,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cflags_gcc_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_LANG(C)
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
|
||||
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
@@ -187,14 +187,14 @@ AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_gcc_option_$1])dnl
|
||||
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
|
||||
VAR,[VAR="no, unknown"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_LANG(C++)
|
||||
ac_save_[]FLAGS="$[]FLAGS"
|
||||
for ac_arg dnl
|
||||
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
|
||||
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
|
||||
#
|
||||
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
|
||||
AC_TRY_COMPILE([],[return 0;],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
|
||||
done
|
||||
FLAGS="$ac_save_[]FLAGS"
|
||||
|
||||
@@ -47,14 +47,15 @@ AC_DEFUN([WM_CHECK_XFT_VERSION],
|
||||
AC_CACHE_CHECK([whether libXft is at least version $1], [ac_cv_lib_xft_version_ok],
|
||||
[CPPFLAGS_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $XFT_CFLAGS $inc_search_path"
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
], [
|
||||
#if !defined(XFT_VERSION) || XFT_VERSION < ]XFT_REQUIRED_VERSION[
|
||||
#error libXft on this system is too old. Consider upgrading to at least $1
|
||||
#endif
|
||||
], [ac_cv_lib_xft_version_ok=yes], [ac_cv_lib_xft_version_ok=no])
|
||||
])], [ac_cv_lib_xft_version_ok=yes], [ac_cv_lib_xft_version_ok=no])
|
||||
CPPFLAGS="$CPPFLAGS_save"])
|
||||
m4_undefine([XFT_REQUIRED_VERSION])dnl
|
||||
AS_IF([test "x$ac_cv_lib_xft_version_ok" != "xyes"], [$3], [$2])dnl
|
||||
|
||||
@@ -198,9 +198,9 @@ AC_DEFUN_ONCE([WM_IMGFMT_CHECK_WEBP],
|
||||
dnl a symbol without first using the header to handle it
|
||||
wm_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lwebp"
|
||||
AC_TRY_LINK(
|
||||
[@%:@include <webp/decode.h>],
|
||||
[WebPGetFeatures(NULL, 1024, NULL);],
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([@%:@include <webp/decode.h>],
|
||||
[WebPGetFeatures(NULL, 1024, NULL);])],
|
||||
[wm_cv_imgfmt_webp="-lwebp"])
|
||||
LIBS="$wm_save_LIBS"
|
||||
AS_IF([test "x$enable_webp$wm_cv_imgfmt_webp" = "xyesno"],
|
||||
|
||||
Reference in New Issue
Block a user