@@ -27,67 +27,16 @@ case $host in
27
27
esac
28
28
AM_CONDITIONAL([ IS_MINGW] , [ test "x$is_mingw" == "xyes"] )
29
29
30
- AM_INIT_AUTOMAKE ( [ foreign subdir-objects] )
31
- saved_cflags="$CFLAGS"
32
- LT_INIT([ disable-static] )
33
- CFLAGS="$saved_cflags"
30
+ # Require Automake 1.11.2 for AM_PROG_AR
31
+ AM_INIT_AUTOMAKE ( [ 1.11.2 foreign subdir-objects] )
34
32
35
33
m4_ifdef ( [ AM_SILENT_RULES ] , [ AM_SILENT_RULES ([ yes] )] )
36
34
37
35
AC_PROG_CC
38
-
39
- # Prefer the compilers native ar/ranlib if available
40
- # We have to manually loop to test these as autoconf inexplicably does
41
- # not provide an AC_PATH_TOOLS macro for this purpose.
42
- candidate_ars="ar"
43
- candidate_ranlibs="ranlib"
44
- case $CC in
45
- *gcc*)
46
- candidate_ars="gcc-ar ar"
47
- candidate_ranlibs="gcc-ranlib ranlib"
48
- ;;
49
- *clang*)
50
- ver=$($CC --version | head -n 1 | cut -d' ' -f3 | cut -d'.' -f1)
51
- candidate_ars="llvm-ar-$ver llvm-ar ar"
52
- candidate_ranlibs="llvm-ranlib-$ver llvm-ranlib ranlib"
53
- ;;
54
- esac
55
-
56
- if test "x$is_osx" == "xyes"; then
57
- candidate_ars="libtool $candidate_ars"
58
- CCDIR=`dirname $CC`
59
- if test x"$CCDIR" != x"."; then
60
- if test -x $CCDIR/libtool; then
61
- # Use libtool from the same directory as our clang
62
- AR=$CCDIR/libtool
63
- candidate_ars=""
64
- fi
65
- fi
66
- fi
67
-
68
- if test -n "$candidate_ars"; then
69
- for candidate in $candidate_ars; do
70
- AC_PATH_TOOL ( AR , $candidate )
71
- if test "x$HAVE_AR" == "xyes"; then
72
- break
73
- fi
74
- done
75
- fi
76
- case $AR in
77
- *libtool)
78
- ARFLAGS="-static -o"
79
- AR_FLAGS="-static -o"
80
- AC_SUBST ( [ ARFLAGS] )
81
- AC_SUBST ( [ AR_FLAGS] )
82
- ;;
83
- esac
84
-
85
- for candidate in $candidate_ranlibs; do
86
- AC_PATH_TOOL ( RANLIB , $candidate )
87
- if test "x$HAVE_RANLIB" == "xyes"; then
88
- break
89
- fi
90
- done
36
+ AM_PROG_AR
37
+ # saved_cflags="$CFLAGS"
38
+ LT_INIT([ disable-static] )
39
+ # CFLAGS="$saved_cflags"
91
40
92
41
AC_SUBST ( [ AR] )
93
42
AC_SUBST ( [ RANLIB] )
0 commit comments