On Sat, Nov 4, 2017 at 12:30 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > It looks like Autotools is not equipped to handle changes to AR and > ARFLAGS. There is no AC_PROG_AR macro to find the correct AR and > ARFLAGS for the platform and compiler. > > Trying to hack AR configuration information in configure.ac produces a > non-working configuration due to hard-coding ARFLAGS like "cru": > > IS_APPLE=`echo $build | $EGREP -i -c 'apple'` > if test "$IS_APPLE" -ne "0"; then > AC_SUBST([AR], ["/usr/bin/libtool"]) > AC_SUBST([ARFLAGS], ["-static -o"]) > AC_SUBST([ac_ct_AR], ["/usr/bin/libtool"]) > fi > > OS X needs the following flags, otherwise building fat libraries and > some cross-compiles fail. > > AR = /usr/bin/libtool > ARFLAGS = -static -o > > Usage of AR and ARFLAGS on OS X must be: > > $(AR) $(ARFLAGS) <library name> ... > > Similar problems are encountered on Solaris with SunCC. We need the > following on the platform when SunCC is the compiler. > > AR = $(CXX) > ARFLAGS = -xar -o > RANLIB = true
In case its need for Apple platforms: $ AR=/usr/bin/libtool ARFLAGS='-static -o' ./configure checking for a BSD-compatible install... /usr/bin/install -c ... checking dependency style of gcc... gcc3 checking the archiver (/usr/bin/libtool) interface... unknown configure: error: could not determine /usr/bin/libtool interface And: $ /usr/bin/libtool -V Apple Inc. version cctools-862 /usr/bin/libtool --version, -v and --help produce errors. -V is the only one that works. Jeff