Don Beaudry's changes to support SGI_ABI on Irix 6.x.
This commit is contained in:
parent
d49266eeed
commit
91922677ea
|
@ -113,6 +113,8 @@ MODLIBS= _MODLIBS_
|
||||||
|
|
||||||
VERSION= @VERSION@
|
VERSION= @VERSION@
|
||||||
CC= @CC@
|
CC= @CC@
|
||||||
|
LINKCC= @LINKCC@
|
||||||
|
SGI_ABI= @SGI_ABI@
|
||||||
OPT= @OPT@
|
OPT= @OPT@
|
||||||
LDFLAGS= @LDFLAGS@
|
LDFLAGS= @LDFLAGS@
|
||||||
DEFS= @DEFS@
|
DEFS= @DEFS@
|
||||||
|
@ -125,6 +127,7 @@ SO= @SO@
|
||||||
LDSHARED= @LDSHARED@
|
LDSHARED= @LDSHARED@
|
||||||
CCSHARED= @CCSHARED@
|
CCSHARED= @CCSHARED@
|
||||||
LINKFORSHARED= @LINKFORSHARED@
|
LINKFORSHARED= @LINKFORSHARED@
|
||||||
|
#@SET_CCC@
|
||||||
|
|
||||||
# Install prefix for architecture-independent files
|
# Install prefix for architecture-independent files
|
||||||
prefix= /usr/local
|
prefix= /usr/local
|
||||||
|
@ -242,6 +245,8 @@ sedscript: $(MAKEFILE)
|
||||||
-e '2s%.*%# $H%p' \
|
-e '2s%.*%# $H%p' \
|
||||||
-e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \
|
-e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \
|
||||||
-e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \
|
-e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \
|
||||||
|
-e '/^CCC=/s/^CCC=[ ]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
|
||||||
|
-e '/^LINKCC=/s/^LINKCC=[ ]*\(.*\)/s%@LINKCC[@]%\1%/p' \
|
||||||
-e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \
|
-e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \
|
||||||
-e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
|
-e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
|
||||||
-e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \
|
-e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \
|
||||||
|
@ -257,6 +262,7 @@ sedscript: $(MAKEFILE)
|
||||||
-e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
|
-e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
|
||||||
-e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
|
-e '/^$E=/s/^$E=\(.*\)/s%^$E=.*%$E=\1%/p' \
|
||||||
$(MAKEFILE) >sedscript
|
$(MAKEFILE) >sedscript
|
||||||
|
echo "/^#@SET_CCC@/d" >>sedscript
|
||||||
echo "/^installdir=/s%=.*%= $(installdir)%" >>sedscript
|
echo "/^installdir=/s%=.*%= $(installdir)%" >>sedscript
|
||||||
echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
|
echo "/^exec_installdir=/s%=.*%=$(exec_installdir)%" >>sedscript
|
||||||
echo "/^srcdir=/s%=.*%= $(srcdir)%" >>sedscript
|
echo "/^srcdir=/s%=.*%= $(srcdir)%" >>sedscript
|
||||||
|
|
|
@ -17,6 +17,7 @@ VERSION= @VERSION@
|
||||||
srcdir= @srcdir@
|
srcdir= @srcdir@
|
||||||
VPATH= @srcdir@
|
VPATH= @srcdir@
|
||||||
|
|
||||||
|
@SET_CCC@
|
||||||
CC= @CC@
|
CC= @CC@
|
||||||
RANLIB= @RANLIB@
|
RANLIB= @RANLIB@
|
||||||
AR= @AR@
|
AR= @AR@
|
||||||
|
@ -24,6 +25,7 @@ AR= @AR@
|
||||||
OPT= @OPT@
|
OPT= @OPT@
|
||||||
LDFLAGS= @LDFLAGS@
|
LDFLAGS= @LDFLAGS@
|
||||||
LDLAST= @LDLAST@
|
LDLAST= @LDLAST@
|
||||||
|
SGI_ABI= @SGI_ABI@
|
||||||
|
|
||||||
DEFS= @DEFS@
|
DEFS= @DEFS@
|
||||||
LIBS= @LIBS@
|
LIBS= @LIBS@
|
||||||
|
|
56
configure.in
56
configure.in
|
@ -32,6 +32,7 @@ if test -f /usr/lib/NextStep/software_version; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set name for machine-dependent library files
|
# Set name for machine-dependent library files
|
||||||
AC_SUBST(MACHDEP)
|
AC_SUBST(MACHDEP)
|
||||||
AC_MSG_CHECKING(MACHDEP)
|
AC_MSG_CHECKING(MACHDEP)
|
||||||
|
@ -53,8 +54,44 @@ then
|
||||||
'') MACHDEP="unknown";;
|
'') MACHDEP="unknown";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# SGI compilers allow the specification of the both the ABI and the
|
||||||
|
# ISA on the command line. Depending on the values of these switches,
|
||||||
|
# different and often incompatable code will be generated.
|
||||||
|
#
|
||||||
|
# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
|
||||||
|
# thus supply support for various ABI/ISA combinations. The MACHDEP
|
||||||
|
# variable is also adjusted.
|
||||||
|
#
|
||||||
|
AC_SUBST(SGI_ABI)
|
||||||
|
if test ! -z "$SGI_ABI"
|
||||||
|
then
|
||||||
|
CC="cc $SGI_ABI"
|
||||||
|
LDFLAGS="$SGI_ABI $LDFLAGS"
|
||||||
|
MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
|
||||||
|
fi
|
||||||
AC_MSG_RESULT($MACHDEP)
|
AC_MSG_RESULT($MACHDEP)
|
||||||
|
|
||||||
|
#
|
||||||
|
# CCC is the command that compiles C++ programs
|
||||||
|
#
|
||||||
|
# Not all make programs have this predefined.
|
||||||
|
#
|
||||||
|
AC_SUBST(SET_CCC)
|
||||||
|
AC_MSG_CHECKING(CCC)
|
||||||
|
if test -z "$CCC"
|
||||||
|
then
|
||||||
|
case $ac_sys_system in
|
||||||
|
IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
|
||||||
|
*) SET_CCC=""
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
SET_CCC="CCC= ${CCC}"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($SET_CCC)
|
||||||
|
|
||||||
|
|
||||||
# checks for alternative programs
|
# checks for alternative programs
|
||||||
AC_MSG_CHECKING(for --without-gcc)
|
AC_MSG_CHECKING(for --without-gcc)
|
||||||
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
||||||
|
@ -152,6 +189,19 @@ AC_TRY_RUN([int main() { return 0; }],
|
||||||
ac_cv_olimit_ok=no)
|
ac_cv_olimit_ok=no)
|
||||||
CC="$ac_save_cc"])
|
CC="$ac_save_cc"])
|
||||||
AC_MSG_RESULT($ac_cv_olimit_ok)
|
AC_MSG_RESULT($ac_cv_olimit_ok)
|
||||||
|
if test $ac_cv_olimit_ok = yes; then
|
||||||
|
OPT="$OPT -OPT:Olimit=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0)
|
||||||
|
AC_CACHE_VAL(ac_cv_opt_olimit_ok,
|
||||||
|
[ac_save_cc="$CC"
|
||||||
|
CC="$CC -OPT:Olimit=0"
|
||||||
|
AC_TRY_RUN([int main() { return 0; }],
|
||||||
|
ac_cv_opt_olimit_ok=yes,
|
||||||
|
ac_cv_opt_olimit_ok=no)
|
||||||
|
CC="$ac_save_cc"])
|
||||||
|
AC_MSG_RESULT($ac_cv_opt_olimit_ok)
|
||||||
if test $ac_cv_olimit_ok = yes; then
|
if test $ac_cv_olimit_ok = yes; then
|
||||||
OPT="$OPT -Olimit 1500"
|
OPT="$OPT -Olimit 1500"
|
||||||
fi
|
fi
|
||||||
|
@ -221,7 +271,7 @@ then
|
||||||
case $ac_sys_system/$ac_sys_release in
|
case $ac_sys_system/$ac_sys_release in
|
||||||
AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
||||||
IRIX/5*) LDSHARED="ld -shared";;
|
IRIX/5*) LDSHARED="ld -shared";;
|
||||||
IRIX*/6*) LDSHARED="ld $SGI_ABI -shared -all"; OPT="$OPT $SGI_ABI";;
|
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||||
SunOS/4*) LDSHARED="ld";;
|
SunOS/4*) LDSHARED="ld";;
|
||||||
SunOS/5*) LDSHARED="ld -G";;
|
SunOS/5*) LDSHARED="ld -G";;
|
||||||
hp*|HP*) LDSHARED="ld -b";;
|
hp*|HP*) LDSHARED="ld -b";;
|
||||||
|
@ -248,7 +298,7 @@ then
|
||||||
Linux*) CCSHARED="-fpic";;
|
Linux*) CCSHARED="-fpic";;
|
||||||
FreeBSD*) CCSHARED="-fpic";;
|
FreeBSD*) CCSHARED="-fpic";;
|
||||||
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
||||||
IRIX*/6*) CCSHARED="$SGI_ABI -all";;
|
IRIX*/6*) CCSHARED="-all";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($CCSHARED)
|
AC_MSG_RESULT($CCSHARED)
|
||||||
|
@ -264,7 +314,7 @@ then
|
||||||
Linux*) LINKFORSHARED="-rdynamic";;
|
Linux*) LINKFORSHARED="-rdynamic";;
|
||||||
next/*) LINKFORSHARED="-u libsys_s";;
|
next/*) LINKFORSHARED="-u libsys_s";;
|
||||||
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
||||||
IRIX*/6*) LINKFORSHARED="$SGI_ABI -all";;
|
IRIX*/6*) LINKFORSHARED="-all";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($LINKFORSHARED)
|
AC_MSG_RESULT($LINKFORSHARED)
|
||||||
|
|
Loading…
Reference in New Issue