comparison aclocal.m4 @ 1760:74fcc977a13d

Automake 1.12 compatibility, based on suggestions by Lance Hepler
author Adam Chlipala <adam@chlipala.net>
date Sat, 12 May 2012 15:22:39 -0400
parents 27d68ccb2c9e
children 4cca386e5766
comparison
equal deleted inserted replaced
1759:add6dc3f4383 1760:74fcc977a13d
56 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 56 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57 [AM_AUTOMAKE_VERSION([1.11.3])dnl 57 [AM_AUTOMAKE_VERSION([1.11.3])dnl
58 m4_ifndef([AC_AUTOCONF_VERSION], 58 m4_ifndef([AC_AUTOCONF_VERSION],
59 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 59 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
60 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 60 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
61
62 # Copyright (C) 2011 Free Software Foundation, Inc.
63 #
64 # This file is free software; the Free Software Foundation
65 # gives unlimited permission to copy and/or distribute it,
66 # with or without modifications, as long as this notice is preserved.
67
68 # serial 1
69
70 # AM_PROG_AR([ACT-IF-FAIL])
71 # -------------------------
72 # Try to determine the archiver interface, and trigger the ar-lib wrapper
73 # if it is needed. If the detection of archiver interface fails, run
74 # ACT-IF-FAIL (default is to abort configure with a proper error message).
75 AC_DEFUN([AM_PROG_AR],
76 [AC_BEFORE([$0], [LT_INIT])dnl
77 AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
78 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
79 AC_REQUIRE_AUX_FILE([ar-lib])dnl
80 AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
81 : ${AR=ar}
82
83 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
84 [am_cv_ar_interface=ar
85 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
86 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
87 AC_TRY_EVAL([am_ar_try])
88 if test "$ac_status" -eq 0; then
89 am_cv_ar_interface=ar
90 else
91 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
92 AC_TRY_EVAL([am_ar_try])
93 if test "$ac_status" -eq 0; then
94 am_cv_ar_interface=lib
95 else
96 am_cv_ar_interface=unknown
97 fi
98 fi
99 rm -f conftest.lib libconftest.a
100 ])
101 ])
102
103 case $am_cv_ar_interface in
104 ar)
105 ;;
106 lib)
107 # Microsoft lib, so override with the ar-lib wrapper script.
108 # FIXME: It is wrong to rewrite AR.
109 # But if we don't then we get into trouble of one sort or another.
110 # A longer-term fix would be to have automake use am__AR in this case,
111 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
112 # similar.
113 AR="$am_aux_dir/ar-lib $AR"
114 ;;
115 unknown)
116 m4_default([$1],
117 [AC_MSG_ERROR([could not determine $AR interface])])
118 ;;
119 esac
120 AC_SUBST([AR])dnl
121 ])
61 122
62 # AM_AUX_DIR_EXPAND -*- Autoconf -*- 123 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
63 124
64 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 125 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
65 # 126 #