Skip to content

Commit 4fc3e92

Browse files
committed
configure: get rid of funky mechanism to find $AR
The unixes where the special case mattered are so niche nowadays that it seems reasonable to change the value of $AR only if it is provided to configure.
1 parent 487f6c9 commit 4fc3e92

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

configure

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ else
111111
echo "Using compiler $CC"
112112
fi
113113

114+
: "${AR:=ar crs}"
115+
114116
echo "CC = $CC" >>$CONFIG_MK
117+
echo "AR = $AR" >> $CONFIG_MK
115118
echo "CFLAGS = -O2" >>$CONFIG_MK
116119
echo "CPPFLAGS += -D_DEFAULT_SOURCE" >>$CONFIG_MK
117120

@@ -224,22 +227,6 @@ if [ "$CC" = "tcc" ]; then
224227
echo "CFLAGS += -Wno-error" >>$CONFIG_MK
225228
fi
226229

227-
# XXX: this whole mechanism reeks of trying to one-up the system's toolchain,
228-
# but it's the one that was there and I'm not sure what are the implications
229-
kern="$(uname -s | tr '/:[A-Z]' '..[a-z])')-$(uname -r | tr /: ..)" || kern="unknown"
230-
AR="ar cr"
231-
case $kern in
232-
sunos-5.*) ;;
233-
unix_sv*) ;;
234-
irix64-*) ;;
235-
irix-*) ;;
236-
dgux-*) ;;
237-
hp-ux-*) ;;
238-
sco*) ;;
239-
*) AR="ar crs" ;;
240-
esac
241-
echo "AR = $AR" >> $CONFIG_MK
242-
243230
#
244231
# Check for flock().
245232
#

0 commit comments

Comments
 (0)