Skip to content

Commit

Permalink
Update deprecated macros by autoconf
Browse files Browse the repository at this point in the history
  • Loading branch information
cybergarage committed Sep 4, 2022
1 parent 7dc0f8c commit 07d363a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 53 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
2022-xx-xx The uecho Authors <[email protected]>
2022-09-04 The uecho Authors <[email protected]>
* v1.2.3
* Add uecho_property_gettype()
* Update deprecated macros in configure.ac by autoconf

2022-08-26 The uecho Authors <[email protected]>
* v1.2.2
Expand Down
21 changes: 11 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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=''

Expand Down Expand Up @@ -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]...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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$//'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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\\"
Expand Down
69 changes: 27 additions & 42 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down Expand Up @@ -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 <sys/types.h>
#include <sys/socket.h>
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 <stdio.h>
#include <string.h>
#include <sys/types.h>
Expand All @@ -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 <sys/types.h>
#include <sys/socket.h>
void func()
Expand All @@ -103,54 +97,45 @@ 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 <sys/types.h>
#include <sys/socket.h>
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 <sys/types.h>
#include <sys/socket.h>
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
##############################

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],
Expand All @@ -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],
Expand All @@ -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],
Expand All @@ -201,7 +185,7 @@ AM_CONDITIONAL(UECHO_ENABLE_EXAMPLES,test "$build_examples" = yes)
# Makefiles
##############################

AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
include/Makefile
lib/Makefile
Expand All @@ -220,3 +204,4 @@ examples/device/Makefile
examples/device/uecholight/Makefile
examples/device/uecholight/unix/Makefile
])
AC_OUTPUT

0 comments on commit 07d363a

Please sign in to comment.