Skip to content

Commit

Permalink
Updated some old AX macro files to fix bootstrap messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjimenez committed Sep 16, 2023
1 parent 2388207 commit 470041b
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 288 deletions.
16 changes: 12 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# (C) Copyright 2005-2007 Rémi Turboult <r3mi@users.sourceforge.net>
#

AC_PREREQ(2.60)
AC_PREREQ([2.60])

AC_INIT([libupnp], [1.14.19], [mroberto@users.sourceforge.net])
AC_INIT([libupnp],[1.14.19],[mroberto@users.sourceforge.net])
dnl ############################################################################
dnl # *Independently* of the above libupnp package version, the libtool version
dnl # of the 3 libraries need to be updated whenever there is a change released:
Expand Down Expand Up @@ -411,7 +411,7 @@ RT_BOOL_ARG_ENABLE([samples], [yes], [compilation of upnp/sample/ code])
AC_PROG_CC
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_LIBTOOL
LT_INIT
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_EGREP
Expand Down Expand Up @@ -509,7 +509,15 @@ AM_CONDITIONAL(WIN32, test x"$ac_cv_win32" = xyes)
#
# Checks for header files (which aren't needed on Win32)
#
AC_HEADER_STDC
#m4_warn([obsolete],
#[The preprocessor macro `STDC_HEADERS' is obsolete.
# Except in unusual embedded environments, you can safely include all
# ISO C90 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP

if test "$ac_cv_win32" = "no"; then
# libupnp code doesn't use autoconf variables yet,
# so just abort if a header file is not found.
Expand Down
32 changes: 20 additions & 12 deletions m4/ax_cflags_gcc_option.m4
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,17 @@ AS_VAR_PUSHDEF([VAR],[ac_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;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]],
[[return 0;]])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
Expand Down Expand Up @@ -125,15 +127,17 @@ AS_VAR_PUSHDEF([VAR],[ac_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;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]],
[[return 0;]])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
Expand All @@ -160,15 +164,17 @@ AS_VAR_PUSHDEF([VAR],[ac_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;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]],
[[return 0;]])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
Expand Down Expand Up @@ -196,15 +202,17 @@ AS_VAR_PUSHDEF([VAR],[ac_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;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]],
[[return 0;]])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
Expand Down
Loading

0 comments on commit 470041b

Please sign in to comment.