Skip to content

Commit 851ca38

Browse files
committed
Fix deprecation warnings with autoconf >=2.70
AC_HEADER_STDC is really obsolete these days.
1 parent b9fd91d commit 851ca38

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

configure.ac

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE
1818
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Package Name])
1919
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Package Version])
2020

21-
AC_CONFIG_HEADER([config.h])
21+
AC_CONFIG_HEADERS([config.h])
2222
AC_CONFIG_MACRO_DIR([m4])
2323

2424
AH_BOTTOM([
@@ -142,7 +142,16 @@ fi
142142
AC_PROG_CXXCPP
143143

144144
AC_PROG_INSTALL
145-
AM_PROG_LEX
145+
dnl autoconf 2.69 AC_PROG_LEX has no parameters
146+
dnl autoconf 2.70 AC_PROG_LEX prints a deprecation warning without params
147+
m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.70]), [-1], [dnl
148+
dnl autoconf < 2.70
149+
AM_PROG_LEX
150+
], [
151+
dnl autoconf >= 2.70
152+
AC_PROG_LEX([yywrap])
153+
])
154+
146155
AC_PROG_YACC
147156
AM_CONDITIONAL(LEXYACC, test -n "$YACC")
148157

@@ -165,7 +174,6 @@ AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t],
165174
# Checks for header files.
166175
# ---------------------------------------------------------------------
167176
AC_HEADER_DIRENT
168-
AC_HEADER_STDC
169177
AC_CHECK_HEADERS(limits.h sys/time.h unistd.h)
170178
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
171179
AC_CHECK_HEADERS(sys/wait.h signal.h getopt.h)
@@ -177,7 +185,7 @@ AC_CHECK_HEADERS(png.h, AM_CONDITIONAL(HAVE_PNG,true), AM_CONDITIONAL(HAVE_PNG,
177185
AC_C_CONST
178186
AC_C_INLINE
179187
AC_TYPE_SIZE_T
180-
AC_HEADER_TIME
188+
AC_CHECK_HEADERS([sys/time.h])
181189
AC_STRUCT_TM
182190

183191
# ---------------------------------------------------------------------
@@ -275,14 +283,14 @@ EXULT_CHECK_SDL(:,AC_MSG_ERROR([[*** SDL not found!]]))
275283

276284
if test "x$PKG_CONFIG" != "x"; then
277285
PKG_CHECK_MODULES(OGG, ogg >= 1.0 vorbis >= 1.0.1 vorbisfile, , AC_MSG_ERROR([*** must have Ogg/Vorbis installed!]))
278-
else
279-
dnl old school test
280-
m4_ifdef([XIPH_PATH_OGG], [
281-
XIPH_PATH_OGG(, AC_MSG_ERROR([*** must have Ogg installed!]))
286+
else
287+
dnl old school test
288+
m4_ifdef([XIPH_PATH_OGG], [
289+
XIPH_PATH_OGG(, AC_MSG_ERROR([*** must have Ogg installed!]))
282290
], AC_MSG_ERROR([*** must have Ogg installed!]))
283-
m4_ifdef([XIPH_PATH_VORBIS], [
284-
XIPH_PATH_VORBIS(, AC_MSG_ERROR([*** must have Vorbis installed!]))
285-
], AC_MSG_ERROR([*** must have Vorbis installed!]))
291+
m4_ifdef([XIPH_PATH_VORBIS], [
292+
XIPH_PATH_VORBIS(, AC_MSG_ERROR([*** must have Vorbis installed!]))
293+
], AC_MSG_ERROR([*** must have Vorbis installed!]))
286294
fi
287295

288296
# ---------------------------------------------------------------------
@@ -1263,11 +1271,11 @@ if test x$enable_fluidsynth = xyes; then
12631271
fi
12641272
fi
12651273
if test x$have_gtk = xyes; then
1266-
echo GLIB....................... : `$PKG_CONFIG --modversion glib-2.0`
1267-
echo GTK+....................... : `$PKG_CONFIG --modversion gtk+-3.0`
1274+
echo GLIB....................... : `$PKG_CONFIG --modversion glib-2.0`
1275+
echo GTK+....................... : `$PKG_CONFIG --modversion gtk+-3.0`
12681276
fi
12691277
if test x$have_gdk_pixbuf = xyes; then
1270-
echo GDK-Pixbuf................. : `$PKG_CONFIG --modversion gdk-pixbuf-2.0`
1278+
echo GDK-Pixbuf................. : `$PKG_CONFIG --modversion gdk-pixbuf-2.0`
12711279
fi
12721280
echo
12731281
echo Build tools................ : $enable_tools
@@ -1277,11 +1285,11 @@ echo Build Exult Studio......... : $enable_exult_studio
12771285
echo Exult Studio support....... : $enable_exult_studio_support
12781286
echo
12791287
if test x$enable_all_hq_scalers = xyes; then
1280-
echo Build all HQ scalers....... : $enable_all_hq_scalers
1288+
echo Build all HQ scalers....... : $enable_all_hq_scalers
12811289
else
1282-
echo Build HQ2X scaler.......... : $enable_hq2x
1283-
echo Build HQ3X scaler.......... : $enable_hq3x
1284-
echo Build HQ4X scaler.......... : $enable_hq4x
1290+
echo Build HQ2X scaler.......... : $enable_hq2x
1291+
echo Build HQ3X scaler.......... : $enable_hq3x
1292+
echo Build HQ4X scaler.......... : $enable_hq4x
12851293
fi
12861294
echo Build NxBR scalers......... : $enable_nxbr
12871295
echo

m4/gb_enable_lto.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#serial 4
4545

4646
AC_DEFUN([GB_ENABLE_LTO], [
47-
AC_ARG_ENABLE([lto], [AC_HELP_STRING([--enable-lto], [turn on link time optimizations (experimental) [default=no]])],
47+
AC_ARG_ENABLE([lto], [AS_HELP_STRING([--enable-lto], [turn on link time optimizations (experimental) [default=no]])],
4848
[enable_lto=$enableval], [enable_lto=no])
4949
5050
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])

0 commit comments

Comments
 (0)