Use the right version of ar when cross-building.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
b372da4b07
commit
e25ea10a13
|
@ -46,6 +46,7 @@ VPATH = @srcdir@
|
|||
|
||||
LD = /usr/bin/ld
|
||||
CC = @CC@
|
||||
AR = @AR@
|
||||
CCOPT = @V_CCOPT@
|
||||
INCLS = -I. @V_INCLS@
|
||||
DEFS = @DEFS@ @V_DEFS@
|
||||
|
@ -340,7 +341,7 @@ all: libpcap.a shared pcap-config
|
|||
|
||||
libpcap.a: $(OBJ)
|
||||
@rm -f $@
|
||||
ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
|
||||
$(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
shared: libpcap.$(DYEXT)
|
||||
|
@ -413,7 +414,7 @@ libpcap.sl: $(OBJ)
|
|||
libpcap.shareda: $(OBJ)
|
||||
@rm -f $@ shr.o
|
||||
$(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
|
||||
ar rc $@ shr.o
|
||||
$(AR) rc $@ shr.o
|
||||
|
||||
#
|
||||
# For platforms that don't support shared libraries (or on which we
|
||||
|
|
|
@ -679,6 +679,7 @@ HAVE_LINUX_TPACKET_AUXDATA
|
|||
V_LEX
|
||||
V_YACC
|
||||
RANLIB
|
||||
AR
|
||||
V_CCOPT
|
||||
V_DEFS
|
||||
V_FINDALLDEVS
|
||||
|
@ -9835,6 +9836,102 @@ else
|
|||
RANLIB="$ac_cv_prog_RANLIB"
|
||||
fi
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ar; ac_word=$2
|
||||
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_prog_AR+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$AR"; then
|
||||
ac_cv_prog_AR="$AR" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_AR="${ac_tool_prefix}ar"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
AR=$ac_cv_prog_AR
|
||||
if test -n "$AR"; then
|
||||
{ echo "$as_me:$LINENO: result: $AR" >&5
|
||||
echo "${ECHO_T}$AR" >&6; }
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_AR"; then
|
||||
ac_ct_AR=$AR
|
||||
# Extract the first word of "ar", so it can be a program name with args.
|
||||
set dummy ar; ac_word=$2
|
||||
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
if test -n "$ac_ct_AR"; then
|
||||
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_AR="ar"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_AR=$ac_cv_prog_ac_ct_AR
|
||||
if test -n "$ac_ct_AR"; then
|
||||
{ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
|
||||
echo "${ECHO_T}$ac_ct_AR" >&6; }
|
||||
else
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_AR" = x; then
|
||||
AR=""
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
|
||||
whose name does not start with the host triplet. If you think this
|
||||
configuration is useful to you, please write to autoconf@gnu.org." >&5
|
||||
echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
|
||||
whose name does not start with the host triplet. If you think this
|
||||
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
AR=$ac_ct_AR
|
||||
fi
|
||||
else
|
||||
AR="$ac_cv_prog_AR"
|
||||
fi
|
||||
|
||||
|
||||
rm -f os-proto.h
|
||||
if test "${LBL_CFLAGS+set}" = set; then
|
||||
|
@ -11450,6 +11547,7 @@ HAVE_LINUX_TPACKET_AUXDATA!$HAVE_LINUX_TPACKET_AUXDATA$ac_delim
|
|||
V_LEX!$V_LEX$ac_delim
|
||||
V_YACC!$V_YACC$ac_delim
|
||||
RANLIB!$RANLIB$ac_delim
|
||||
AR!$AR$ac_delim
|
||||
V_CCOPT!$V_CCOPT$ac_delim
|
||||
V_DEFS!$V_DEFS$ac_delim
|
||||
V_FINDALLDEVS!$V_FINDALLDEVS$ac_delim
|
||||
|
@ -11477,7 +11575,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim
|
|||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
|
@ -1313,6 +1313,7 @@ solaris*)
|
|||
esac
|
||||
|
||||
AC_PROG_RANLIB
|
||||
AC_CHECK_TOOL([AR], [ar])
|
||||
|
||||
AC_LBL_DEVEL(V_CCOPT)
|
||||
|
||||
|
|
Reference in New Issue