OS=`echo $OS | $TRPROG '[[A-Z]]' '[[a-z]]'`
case "$OS" in
"sunos") echo "Looks like SunOS 4.x"
- if test -z "$GCC"; then
+ if test -n "$GCC"; then
+ STATIC_FLAGS="-static"
+ else
STATIC_FLAGS="-Bstatic"
fi
;;
AC_DEFINE(_ALL_SOURCE)
;;
"hp-ux") echo "Looks like HP-UX"
- if test -z "$GCC"; then
+ if test -n "$GCC"; then
+ STATIC_FLAGS="-static"
+ else
STATIC_FLAGS="-Wl,-a,archive"
fi
;;
"osf1") echo "Looks like OSF/1"
- if test -z "$GCC"; then
+ if test -n "$GCC"; then
+ STATIC_FLAGS="-static"
+ else
STATIC_FLAGS="-non_shared"
fi
# C2 security stuff
fi
;;
"linux") echo "Looks like linux"
+ if test -n "$GCC"; then
+ STATIC_FLAGS="-static"
+ fi
;;
"convex") echo "Looks like ConvexOs"
AC_DEFINE(_CONVEX_SOURCE)
;;
esac
dnl
-dnl We can't make a static binary on solaris and it causes probs on AIX
-dnl
-if test -n "$GCC" -a -n "$OS" -a "$OS" != "solaris" -a "$OS" != "aix" ; then
- STATIC_FLAGS="-static"
-fi
-dnl
dnl extra AFS libs
dnl
if test -n "$AFS" ; then