added Darwin test to see if -lm needed
This commit is contained in:
parent
8671dffe68
commit
a255812074
@ -1,5 +1,8 @@
|
||||
2001-04-02 Frank Warmerdam <warmerdam@pobox.com>
|
||||
|
||||
* configure/config.site: modified to check if -lm is needed for
|
||||
MACHDEPLIBS if not supplied by config.site. Needed for Darwin.
|
||||
|
||||
* config.guess: updated wholesale to an FSF version apparently
|
||||
from 1998 (as opposed to 1994). This is mainly inspired by
|
||||
providing for MacOS X support.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /cvs/maptools/cvsroot/libtiff/Attic/config.site,v 1.3 2001-03-30 01:55:32 warmerda Exp $
|
||||
# $Header: /cvs/maptools/cvsroot/libtiff/Attic/config.site,v 1.4 2001-04-03 03:51:57 warmerda Exp $
|
||||
#
|
||||
# TIFF Software
|
||||
#
|
||||
@ -134,7 +134,7 @@
|
||||
#GCOPTS="-g" # options to pass C compiler
|
||||
#OPTIMIZER="-O" # Optimization options for compiler
|
||||
#LIBPORT='${PORT}/libport.a' # library with emulation code
|
||||
#MACHDEPLIBS="" # extra libraries for linking
|
||||
#MACHDEPLIBS="-lm" # extra libraries for linking
|
||||
#PORTFUNCS="" # non-standard functions to emulate
|
||||
#RANLIB=":" # pathname of suitable ranlib program
|
||||
#DSOSUF="so" # DSO filename suffix
|
||||
|
24
configure
vendored
24
configure
vendored
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.11 2001-03-30 01:55:32 warmerda Exp $
|
||||
# $Header: /cvs/maptools/cvsroot/libtiff/configure,v 1.12 2001-04-03 03:51:57 warmerda Exp $
|
||||
#
|
||||
# Tag Image File Format (TIFF) Software
|
||||
#
|
||||
@ -57,7 +57,6 @@ PORT=auto # enable portability emulations
|
||||
HTML=no # install HTML documentation
|
||||
LIBGL=auto # auto-enable build of SGI -lgl apps
|
||||
LIBIMAGE=auto # auto-enable build of SGI -limage apps
|
||||
MACHDEPLIBS=-lm # machine-dependent libraries for apps
|
||||
: ${CC=} # name of C compiler to use
|
||||
: ${CCOMPILER=} # full pathname of C compiler
|
||||
: ${OPTIMIZER=-O} # Optimization flag
|
||||
@ -153,7 +152,7 @@ do
|
||||
-target|--target) ac_prev=TARGET;;
|
||||
-target=*|--target=*) TARGET="$ac_optarg" ;;
|
||||
-version|--version)
|
||||
echo "This is TIFF configure $Revision: 1.11 $"
|
||||
echo "This is TIFF configure $Revision: 1.12 $"
|
||||
exit 0
|
||||
;;
|
||||
-help|--help) usage; exit 0;;
|
||||
@ -592,10 +591,10 @@ if [ -z "${GCOPTS-}" ]; then
|
||||
if capture $CCOMPILER $ENVOPTS -g -c dummy.c; then
|
||||
Note "Looks like $CCOMPILER supports the -g option."
|
||||
# NB: cannot use captureX here 'cuz we lose stderr
|
||||
if $CCOMPILER $ENVOPTS -c -g -O dummy.c >t 2>&1 && CheckForGandO t; then
|
||||
if $CCOMPILER $ENVOPTS -c -g $OPTIMIZER dummy.c >t 2>&1 && CheckForGandO t; then
|
||||
GCOPTS="-g"
|
||||
else
|
||||
Note "... but not together with the -O option, not using it."
|
||||
Note "... but not together with the $OPTIMIZER option, not using it."
|
||||
GCOPTS=
|
||||
fi
|
||||
else
|
||||
@ -764,6 +763,21 @@ CheckForFunc()
|
||||
runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}"
|
||||
}
|
||||
|
||||
#
|
||||
# Verify that we have -lm. Darwin (for instance) does not. Add to
|
||||
# MACHDEPLIBS if required.
|
||||
#
|
||||
|
||||
if [ -z "${MACHDEPLIBS-}" ]; then
|
||||
MACHDEPLIBS=""
|
||||
if ! CheckForFunc cos ; then
|
||||
MACHDEPLIBS="-lm"
|
||||
echo "Defaulting MACHDEPLIBS to -lm."
|
||||
else
|
||||
echo "Leaving MACHDEPLIBS empty, apparently you don't need -lm."
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Look for a function declaration in system include files.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user