From 07d363a0cb1cbd0db431e923e6c1825d7e7cb461 Mon Sep 17 00:00:00 2001 From: Satoshi Konno Date: Sun, 4 Sep 2022 16:42:37 +0900 Subject: [PATCH] Update deprecated macros by autoconf --- ChangeLog | 3 ++- configure | 21 ++++++++-------- configure.ac | 69 ++++++++++++++++++++-------------------------------- 3 files changed, 40 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d959451..5efd85b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ -2022-xx-xx The uecho Authors +2022-09-04 The uecho Authors * v1.2.3 * Add uecho_property_gettype() + * Update deprecated macros in configure.ac by autoconf 2022-08-26 The uecho Authors * v1.2.2 diff --git a/configure b/configure index 50949dca..152d5924 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for uecho 1.2.0. +# Generated by GNU Autoconf 2.71 for uecho 1.2.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -607,8 +607,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='uecho' PACKAGE_TARNAME='uecho' -PACKAGE_VERSION='1.2.0' -PACKAGE_STRING='uecho 1.2.0' +PACKAGE_VERSION='1.2.2' +PACKAGE_STRING='uecho 1.2.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1314,7 +1314,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures uecho 1.2.0 to adapt to many kinds of systems. +\`configure' configures uecho 1.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1381,7 +1381,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of uecho 1.2.0:";; + short | recursive ) echo "Configuration of uecho 1.2.2:";; esac cat <<\_ACEOF @@ -1477,7 +1477,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -uecho configure 1.2.0 +uecho configure 1.2.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1734,7 +1734,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by uecho $as_me 1.2.0, which was +It was created by uecho $as_me 1.2.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3220,7 +3220,7 @@ fi # Define the identity of the package. PACKAGE='uecho' - VERSION='1.2.0' + VERSION='1.2.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5889,6 +5889,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -6329,7 +6330,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by uecho $as_me 1.2.0, which was +This file was extended by uecho $as_me 1.2.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6397,7 +6398,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -uecho config.status 1.2.0 +uecho config.status 1.2.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 9a2f4305..7d9bcd16 100644 --- a/configure.ac +++ b/configure.ac @@ -9,9 +9,9 @@ ################################################################## AC_CONFIG_AUX_DIR(config) -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS(config.h) -AC_INIT([uecho], [1.2.0]) +AC_INIT([uecho],[1.2.2]) AC_CONFIG_SRCDIR([include/uecho/typedef.h]) AM_INIT_AUTOMAKE([subdir-objects]) @@ -50,20 +50,17 @@ AC_CHECK_FUNCS([getifaddrs]) ##### socklen_t #### AC_MSG_CHECKING(for socklen_t) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include socklen_t foosocket; -], -[], -[AC_MSG_RESULT(yes) -AC_DEFINE([HAVE_SOCKLEN_T],1,[SOCKLEN_T])], -[AC_MSG_RESULT(no)] -) +]], [[]])],[AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_SOCKLEN_T],1,[SOCKLEN_T])],[AC_MSG_RESULT(no) +]) ##### SIOCGIFHWADDR #### AC_MSG_CHECKING(for SIOCGIFHWADDR) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #include @@ -80,16 +77,13 @@ void func() ifr.ifr_addr.sa_family = AF_INET; ioctl(sock, SIOCGIFHWADDR, &ifr); } -], -[], -[AC_MSG_RESULT(yes) -AC_DEFINE([HAVE_SIOCGIFHWADDR],1,[SIOCGIFHWADDR])], -[AC_MSG_RESULT(no)] -) +]], [[]])],[AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_SIOCGIFHWADDR],1,[SIOCGIFHWADDR])],[AC_MSG_RESULT(no) +]) ##### sockaddr_dl #### AC_MSG_CHECKING(for sockaddr_dl) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include void func() @@ -103,16 +97,13 @@ void func() LLADDR(dl); freeifaddrs(ifaddr); } -], -[], -[AC_MSG_RESULT(yes) -AC_DEFINE([HAVE_SOCKADDR_DL],1,[SOCKADDR_DL])], -[AC_MSG_RESULT(no)] -) +]], [[]])],[AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_SOCKADDR_DL],1,[SOCKADDR_DL])],[AC_MSG_RESULT(no) +]) ##### IP_PKTINFO #### AC_MSG_CHECKING(for IP_PKTINFO) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include void func() @@ -120,16 +111,13 @@ void func() int on=1; setsockopt(0, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on)); } -], -[], -[AC_MSG_RESULT(yes) -AC_DEFINE([HAVE_IP_PKTINFO],1,[IP_PKTINFO])], -[AC_MSG_RESULT(no)] -) +]], [[]])],[AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_IP_PKTINFO],1,[IP_PKTINFO])],[AC_MSG_RESULT(no) +]) ##### SO_NOSIGPIPE #### AC_MSG_CHECKING(for SO_NOSIGPIPE) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include void func() @@ -137,12 +125,9 @@ void func() int on=1; setsockopt(0, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); } -], -[], -[AC_MSG_RESULT(yes) -AC_DEFINE([HAVE_SO_NOSIGPIPE],1,[SO_NOSIGPIPES])], -[AC_MSG_RESULT(no)] -) +]], [[]])],[AC_MSG_RESULT(yes) +AC_DEFINE([HAVE_SO_NOSIGPIPE],1,[SO_NOSIGPIPES])],[AC_MSG_RESULT(no) +]) ############################## # Debug @@ -150,7 +135,7 @@ AC_DEFINE([HAVE_SO_NOSIGPIPE],1,[SO_NOSIGPIPES])], AC_ARG_ENABLE( [debug], - AC_HELP_STRING([--enable-debug], [ enable debugging (default = no) ]), + AS_HELP_STRING([--enable-debug],[ enable debugging (default = no) ]), [case "${enableval}" in yes | no ) enable_debug="${enableval}" ;; esac], @@ -167,7 +152,7 @@ fi AC_ARG_ENABLE( [test], - AC_HELP_STRING([--enable-test], [ build tests (default = no) ]), + AS_HELP_STRING([--enable-test],[ build tests (default = no) ]), [case "${enableval}" in yes | no ) build_test="${enableval}" ;; esac], @@ -188,8 +173,7 @@ fi AC_ARG_ENABLE( [examples], - AC_HELP_STRING([--enable-examples], - [ build examples (default = yes) ]), + AS_HELP_STRING([--enable-examples],[ build examples (default = yes) ]), [case "${enableval}" in yes | no ) build_examples="${enableval}" ;; esac], @@ -201,7 +185,7 @@ AM_CONDITIONAL(UECHO_ENABLE_EXAMPLES,test "$build_examples" = yes) # Makefiles ############################## -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile include/Makefile lib/Makefile @@ -220,3 +204,4 @@ examples/device/Makefile examples/device/uecholight/Makefile examples/device/uecholight/unix/Makefile ]) +AC_OUTPUT