gnulib-tool: Synthesize appropriate _LDFLAGS for a libtool library.
[pspp] / m4 / lib-link.m4
index 9f3be3a2fdaea2672ebfe2d709d42d6521f8732b..2ea9d6d073c84b7f876a24930dc2d849c1293992 100644 (file)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 24 (gettext-0.18.2)
+# lib-link.m4 serial 25 (gettext-0.18.2)
 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -85,7 +85,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
       *)       LIBS="$LIB[]NAME $LIBS" ;;
     esac
-    AC_TRY_LINK([$3], [$4],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
       [ac_cv_lib[]Name=yes],
       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
     LIBS="$ac_save_LIBS"