Skip to content

Commit 089f853

Browse files
authored
Merge pull request #33 from libusb/claude/fix-issue-28-yhadz
Update autoconf macros to use modern AC_* syntax
2 parents 8608a71 + dd76a66 commit 089f853

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AC_CONFIG_MACRO_DIR([m4])
66

77
AC_PREREQ([2.50])
88
AC_PROG_CC
9-
AC_PROG_LIBTOOL
9+
LT_INIT
1010
AC_C_INLINE
1111
AM_PROG_CC_C_O
1212

m4/au_check_lib_soname.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ AC_DEFUN([AU_CHECK_LIB_SONAME], [
2121
AU_CHECK_LIB_SONAME_LIBS="$LIBS"
2222
LIBS="$LIBS $7 -l$2"
2323
shrext_regexp=`echo "$shrext_cmds" | sed 's/\./\\\\./'`
24-
AC_TRY_LINK([
24+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2525
void libusb_close(void *);
26-
], [
26+
]], [[
2727
libusb_close((void*)0);
28-
],
28+
]])],
2929
[AS_VAR_SET([ac_Lib_SONAME], [`objdump -p conftest$ac_exeext | sed -n 's/@<:@ \t@:>@\+NEEDED@<:@ \t@:>@\+\('lib[$2]$shrext_regexp'.*\)$/\1/p'`])])
3030
LIBS="$AU_CHECK_LIB_SONAME_LIBS"
3131
AS_IF([test x"$ac_Lib_SONAME" = x ],

m4/au_have_gnu_errno.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ m4_pattern_allow([^AU_])
55
# Check for GNU extensions of errno.h.
66
AC_DEFUN([AU_HAVE_GNU_ERRNO_H], [
77
AC_CACHE_CHECK([for GNU extensions of errno.h], [ac_cv_have_gnu_errno_h],[
8-
AC_TRY_COMPILE([
8+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
99
#define _GNU_SOURCE
1010
#include <errno.h>
11-
], [char *testvar = program_invocation_name;],
11+
]], [[char *testvar = program_invocation_name;]])],
1212
[ac_cv_have_gnu_errno_h=yes], [ac_cv_have_gnu_errno_h=no])])
1313
AS_IF([test x"$ac_cv_have_gnu_errno_h" = x"yes"], [
1414
AC_DEFINE([HAVE_GNU_ERRNO_H], [1], [Define to 1 if you have the <errno.h> header file with GNU extensions.])

0 commit comments

Comments
 (0)