Skip to content

Commit 6823406

Browse files
committed
autoconf: update configure.ac for new autoconf 2.72
1 parent c707c6b commit 6823406

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/configure.ac

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ AC_CONFIG_HEADERS([ac-hdrs.h])
2323

2424
dnl Checks for programs.
2525
AC_PROG_CC
26-
AC_PROG_GCC_TRADITIONAL
2726

2827

2928
dnl AC_PATH_PROG(LD, ld, ld)dnl
@@ -141,9 +140,9 @@ if test "$ac_cv_libsocket_both" = 1 ; then
141140
if test "$ac_cv_func_socket_lsocket" = yes ; then
142141
t_oldLibs="$LIBS"
143142
LIBS="$LIBS -lsocket"
144-
AC_TRY_LINK([],[gethostbyname();], ,[
143+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[gethostbyname();]])],[],[
145144
LIBS="$LIBS -lnsl" # Add this Solaris library..
146-
AC_TRY_LINK([],[gethostbyname();],[
145+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[gethostbyname();]])],[],[
147146
LIBSOCKET="-lsocket -lnsl"
148147
ac_cv_func_gethostbyname_lnsl=yes
149148
], [
@@ -164,7 +163,7 @@ LIBS="$t_oldLibs"
164163

165164
if test "$ac_cv_func_socket" = no -a "$LIBSOCKET" != ""; then
166165
LIBS="$LIBS $LIBSOCKET"
167-
AC_TRY_LINK([],[socket();], ac_cv_func_socket=yes)
166+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[socket();]])],[ac_cv_func_socket=yes],[])
168167
if test $ac_cv_func_socket = yes; then
169168
AC_DEFINE(HAVE_SOCKET)
170169
AC_MSG_RESULT([Has socket() when using $LIBSOCKET])
@@ -173,7 +172,7 @@ if test "$ac_cv_func_socket" = no -a "$LIBSOCKET" != ""; then
173172
fi
174173
if test "$ac_cv_func_socketpair" = no -a "$LIBSOCKET" != ""; then
175174
LIBS="$LIBS $LIBSOCKET"
176-
AC_TRY_LINK([],[socketpair();], ac_cv_func_socketpair=yes)
175+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[socketpair();]])],[ac_cv_func_socketpair=yes],[])
177176
if test $ac_cv_func_socketpair = yes; then
178177
AC_DEFINE(HAVE_SOCKETPAIR)
179178
AC_MSG_RESULT([Has socketpair() when using $LIBSOCKET])
@@ -199,7 +198,7 @@ LIBS="$LIBS $LIBSOCKET"
199198
# THEN call the AC_REPLACE_FUNCS()
200199
if test "$ac_cv_func_gai_strerror" = no ; then
201200
LIBS="$LIBS -linet6"
202-
AC_TRY_LINK([],[gai_strerror();], ac_cv_func_gai_strerror=yes)
201+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[gai_strerror();]])],[ac_cv_func_gai_strerror=yes],[])
203202
LIBS="$t_oldLibs"
204203
if test "$ac_cv_func_gai_strerror" = yes; then
205204
LIBSOCKET="$LIBSOCKET -linet6"
@@ -219,7 +218,7 @@ AC_SUBST(LIBS,"$LIBS")
219218
dnl Check for the __sync_fetch_and_add builtin
220219
dnl the check needs to use long long x, since we're incrementing a long long in the stats.
221220
AC_CACHE_CHECK([for __sync_fetch_and_add], ac_cv_func_sync_fetch_and_add,
222-
[AC_TRY_LINK([],[long long x;__sync_fetch_and_add(&x,1);],ac_cv_func_sync_fetch_and_add=yes,ac_cv_func_sync_fetch_and_add=no)])
221+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[long long x;__sync_fetch_and_add(&x,1);]])],[ac_cv_func_sync_fetch_and_add=yes],[ac_cv_func_sync_fetch_and_add=no])])
223222
if test "$ac_cv_func_sync_fetch_and_add" = yes; then
224223
AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD,1,[Define if you have the __sync_fetch_and_add function])
225224
fi

0 commit comments

Comments
 (0)