diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2001-01-26 16:18:16 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2001-01-26 16:18:16 (GMT) |
commit | 61c5115672f679a6fc0ef8fb2863ac0d31df364f (patch) | |
tree | 8e106ad27c0f76fd7f8b84011a20b2cfc0640543 /configure.in | |
parent | 3ecf0aae7bf7c8d13c1f351a94e75912674631bb (diff) | |
download | cpython-61c5115672f679a6fc0ef8fb2863ac0d31df364f.zip cpython-61c5115672f679a6fc0ef8fb2863ac0d31df364f.tar.gz cpython-61c5115672f679a6fc0ef8fb2863ac0d31df364f.tar.bz2 |
- LIBRARY is now a SUBST variable.
- Add CFLAGSFORSHARED variable. configure sets this to CCSHARED if LDLIBRARY
is a shared library.
- Remove -fPIC from OPT, it has no business there.
- Change CCSHARED option for Linux to -fPIC. It should probably be
-fPIC on a few other platforms as well.
- Don't create silly boot Makefile, create Setup files and run makesetup
instead.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/configure.in b/configure.in index 0b3bf8e..8426b32 100644 --- a/configure.in +++ b/configure.in @@ -190,6 +190,14 @@ Monterey*) esac;; esac +AC_SUBST(LIBRARY) +AC_MSG_CHECKING(LIBRARY) +if test -z "$LIBRARY" +then + LIBRARY='libpython$(VERSION).a' +fi +AC_MSG_RESULT($LIBRARY) + # LDLIBRARY is the name of the library to link against (as opposed to the # name of the library into which to insert object files). On systems # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in @@ -197,7 +205,7 @@ esac # shared (i.e., DLL) library. AC_SUBST(LDLIBRARY) AC_SUBST(DLLLIBRARY) -LDLIBRARY='$(LIBRARY)' +LDLIBRARY="$LIBRARY" DLLLIBRARY='' # LINKCC is the command that links the python executable -- default is $(CC). @@ -270,8 +278,8 @@ then case $GCC in yes) case $ac_cv_prog_cc_g in - yes) OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC";; - *) OPT="-O2 -Wall -Wstrict-prototypes -fPIC";; + yes) OPT="-g -O2 -Wall -Wstrict-prototypes";; + *) OPT="-O2 -Wall -Wstrict-prototypes";; esac ;; *) OPT="-O";; @@ -283,11 +291,6 @@ case $ac_sys_system in Monterey*) OPT="";; esac -# Cygwin does not need PIC compiler option so remove it to prevent warnings -case $ac_sys_system in -CYGWIN*) OPT="`echo $OPT | sed 's/ *-fPIC//'`";; -esac - if test "$ac_arch_flags" then OPT="$OPT $ac_arch_flags" @@ -581,7 +584,7 @@ then then CCSHARED="-fpic"; else CCSHARED="+z"; fi;; - Linux*) CCSHARED="-fpic";; + Linux*) CCSHARED="-fPIC";; BSD/OS*/4*) CCSHARED="-fpic";; OpenBSD*) CCSHARED="-fpic";; FreeBSD*|NetBSD*) CCSHARED="-fPIC";; @@ -632,6 +635,14 @@ then fi AC_MSG_RESULT($LINKFORSHARED) +AC_SUBST(CFLAGSFORSHARED) +AC_MSG_CHECKING(CFLAGSFORSHARED) +if test ! "$LIBRARY" = "$LDLIBRARY" +then + CFLAGSFORSHARED='$(CCSHARED)' +fi +AC_MSG_RESULT($CFLAGSFORSHARED) + # checks for libraries AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX @@ -1395,13 +1406,21 @@ done AC_MSG_RESULT(done) # generate output files -echo "creating Makefile" +AC_OUTPUT(Makefile.pre Modules/Setup.config setup.cfg) -# "boot" Makefile -cat >Makefile <<\EOF -# This file is automaticly generated by configure. -all: - \$(MAKE) -f Makefile.pre Makefile -EOF +echo "creating Setup" +if test ! -f Modules/Setup +then + cp $srcdir/Modules/Setup.dist Modules/Setup +fi -AC_OUTPUT(Makefile.pre Modules/Setup.config setup.cfg) +echo "creating Setup.local" +if test ! -f Modules/Setup.local +then + echo "# Edit this file for local setup changes" >Modules/Setup.local +fi + +echo "creating Makefile" +$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ + -s Modules Modules/Setup.config \ + Modules/Setup Modules/Setup.local |