*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a4c8ee3710
commit
7a2f098e57
6 changed files with 571 additions and 61 deletions
|
|
@ -1,26 +1,29 @@
|
|||
|
||||
SRCS = stab.c elf.c object.c init.c segment.c signal.c
|
||||
OBJS = stab.o elf.o object.o signal.o segment.o init.o main.o
|
||||
|
||||
all::
|
||||
CC -Kpic -c main.cxx
|
||||
cc -c $(SRCS)
|
||||
CC -G $(OBJS) -o libwad.so
|
||||
|
||||
swig::
|
||||
swig -python wad.i
|
||||
CC -Kpic -c main.cxx
|
||||
cc -c $(SRCS) wad_wrap.c -I/usr/local/include/python1.6
|
||||
CC -G $(OBJS) wad_wrap.o -o wadmodule.so
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
|
||||
|
||||
some::
|
||||
cc -g bar.c blah.c -L. -lwad -R /u0/beazley/Projects/WAD -lelf
|
||||
# Location of your Python installation
|
||||
PYINCLUDE = -I/usr/local/include/python1.5 -I/usr/local/lib/python1.5/config
|
||||
|
||||
wc::
|
||||
wc $(SRCS)
|
||||
# Location of your Tcl installation
|
||||
TCLINCLUDE = -I/usr/local/include
|
||||
|
||||
semi::
|
||||
egrep ";" $(SRCS) | wc
|
||||
# Location of your Perl installation
|
||||
PERLINCLUDE = -I/usr/lib/perl5/5.00503/i386-linux/CORE
|
||||
|
||||
all: wad python tcl perl
|
||||
|
||||
|
||||
wad:
|
||||
@cd Wad; $(MAKE) wad
|
||||
|
||||
python:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(PYINCLUDE)' python
|
||||
|
||||
tcl:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(TCLINCLUDE)' tcl
|
||||
|
||||
perl:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(PERLINCLUDE)' perl
|
||||
|
||||
|
||||
|
|
|
|||
28
Tools/WAD/Makefile.in
Normal file
28
Tools/WAD/Makefile.in
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Generated automatically from Makefile.in by configure.
|
||||
|
||||
|
||||
# Location of your Python installation
|
||||
PYINCLUDE = @PYINCLUDE@
|
||||
|
||||
# Location of your Tcl installation
|
||||
TCLINCLUDE = @TCLINCLUDE@
|
||||
|
||||
# Location of your Perl installation
|
||||
PERLINCLUDE = @PERL5EXT@
|
||||
|
||||
all: wad @MAKEPYTHON@ @MAKETCL@ @MAKEPERL@
|
||||
|
||||
|
||||
wad:
|
||||
@cd Wad; $(MAKE) wad
|
||||
|
||||
python:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(PYINCLUDE)' python
|
||||
|
||||
tcl:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(TCLINCLUDE)' tcl
|
||||
|
||||
perl:
|
||||
@cd Wad; $(MAKE) SINCLUDE='$(PERLINCLUDE)' perl
|
||||
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ AT ALL. PLEASE KEEP AWAY FROM SMALL CHILDREN, PETS, NUCLEAR REACTORS,
|
|||
AIR-TRAFFIC CONTROL, VOTING MACHINES, AND MEDICAL EQUIPMENT. SIDE
|
||||
EFFECTS MAY INCLUDE NAUSEA, VOMITING, AND HEADACHE. OTHER THAN THIS,
|
||||
IT'S PERFECTLY SAFE.
|
||||
|
||||
|
||||
1. Introduction
|
||||
|
||||
WAD is an embedded error-recovery mechanism that attempts to convert
|
||||
|
|
|
|||
|
|
@ -1,55 +1,70 @@
|
|||
# Generated automatically from Makefile.in by configure.
|
||||
#######################################################################
|
||||
# WAD Makefile
|
||||
#
|
||||
# David Beazley
|
||||
# January 1, 2001
|
||||
#######################################################################
|
||||
|
||||
SRCS = return.c default.c stack.c stab.c elf.c object.c init.c segment.c signal.c
|
||||
OBJS = return.o default.o stack.o stab.o elf.o object.o signal.o segment.o init.o
|
||||
INCLUDE = -I../Include -I.
|
||||
OPT = -DWAD_SOLARIS
|
||||
LIBS =
|
||||
# These are the files that make up the WAD core
|
||||
WADSRCS = return.c default.c stack.c stab.c elf.c object.c init.c segment.c signal.c
|
||||
WADOBJS = return.o default.o stack.o stab.o elf.o object.o signal.o segment.o init.o
|
||||
INCLUDE = -I../Include -I. $(SINCLUDE)
|
||||
WADOPT = -DWAD_LINUX
|
||||
|
||||
#PYINCLUDE = -I/usr/local/include/python2.0
|
||||
PYINCLUDE = -I/usr/local/include/python1.5
|
||||
# Location of your Python installation
|
||||
PYINCLUDE = -I/usr/local/include/python1.5 -I/usr/local/lib/python1.5/config
|
||||
PYSRCS = wadpy.cxx
|
||||
PYOBJS = wadpy.o
|
||||
|
||||
# Location of your Tcl installation
|
||||
TCLINCLUDE = -I/usr/local/include
|
||||
PERLINCLUDE = -I/usr/local/lib/perl5/5.6.0/sun4-solaris/CORE
|
||||
TCLSRCS = wadtcl.cxx
|
||||
TCLOBJS = wadtcl.o
|
||||
|
||||
all::
|
||||
CC -Kpic -c $(OPT) $(INCLUDE) main.cxx
|
||||
cc -c $(OPT) $(INCLUDE) $(SRCS)
|
||||
CC -G $(OBJS) main.o -o libwad.so $(LIBS)
|
||||
# Location of your Perl installation
|
||||
PERLINCLUDE = -I/usr/lib/perl5/5.00503/i386-linux/CORE
|
||||
PERLSRCS = wadpl.cxx
|
||||
PERLOBJS = wadpl.o
|
||||
|
||||
# C Compiler
|
||||
CC = gcc
|
||||
CFLAGS = -fpic
|
||||
|
||||
# C++ Compiler
|
||||
CXX = c++
|
||||
CXXFLAGS = -fpic
|
||||
|
||||
# Linking options
|
||||
CLINK =
|
||||
CXXLINK = g++ -shared
|
||||
|
||||
# Rules for creation of a .o file from .cxx
|
||||
.SUFFIXES: .cxx
|
||||
.cxx.o:
|
||||
$(CXX) $(CXXFLAGS) $(WADOPT) $(INCLUDE) -c -o $*.o $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(WADOPT) $(INCLUDE) -c -o $*.o $<
|
||||
|
||||
wad: $(WADOBJS) main.o
|
||||
$(CXXLINK) $(WADOBJS) main.o -o libwad.so
|
||||
cp libwad.so ..
|
||||
|
||||
python::
|
||||
cc -c $(OPT) $(INCLUDE) $(SRCS)
|
||||
CC -Kpic -c $(INCLUDE) $(PYINCLUDE) wadpy.cxx
|
||||
CC -G $(OBJS) main.o wadpy.o -o libwadpy.so $(LIBS)
|
||||
python: $(WADOBJS) $(PYOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(PYOBJS) -o libwadpy.so
|
||||
cp libwadpy.so ..
|
||||
|
||||
tcl::
|
||||
cc -c $(OPT) $(INCLUDE) $(SRCS)
|
||||
CC -Kpic -c $(INCLUDE) $(TCLINCLUDE) wadtcl.cxx
|
||||
CC -G $(OBJS) wadtcl.o -o wad.so $(LIBS)
|
||||
cp wad.so libwadtcl.so
|
||||
tcl: $(WADOBJS) $(TCLOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(TCLOBJS) -o libwadtcl.so
|
||||
cp libwadtcl.so ..
|
||||
|
||||
perl::
|
||||
makehandler.py
|
||||
cc -c $(OPT) $(INCLUDE) $(SRCS)
|
||||
CC -Kpic -c $(INCLUDE) $(PERLINCLUDE) wadpl.cxx
|
||||
CC -G $(OBJS) wadpl.o -o libwadpl.so $(LIBS)
|
||||
perl: wad_perl_handler.c $(WADOBJS) $(PERLOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(PERLOBJS) -o libwadpl.so
|
||||
cp libwadpl.so ..
|
||||
|
||||
linux::
|
||||
g++ -fpic -c -DWAD_LINUX $(INCLUDE) main.cxx
|
||||
gcc -g -c -DWAD_LINUX $(INCLUDE) $(SRCS)
|
||||
g++ -shared $(OBJS) main.o -o libwad.so $(LIBS)
|
||||
cp libwad.so ..
|
||||
|
||||
linux-python::
|
||||
gcc -c -DWAD_LINUX $(INCLUDE) $(SRCS)
|
||||
g++ -fpic -c -DWAD_LINUX $(INCLUDE) $(PYINCLUDE) wadpy.cxx
|
||||
g++ -shared $(OBJS) wadpy.o -o libwadpy.so $(LIBS)
|
||||
cp libwadpy.so ..
|
||||
|
||||
linux2::
|
||||
cc -DWAD_LINUX $(INCLUDE) signal.c stack.c default.c demangle.c return.c stab.c elf.c object.c segment.c init.c debug.c
|
||||
wad_perl_handler.c:
|
||||
python makehandler.py
|
||||
|
||||
debug::
|
||||
cc -g debug.c $(INCLUDE) -L. -R. -lwad
|
||||
|
|
@ -67,3 +82,6 @@ semi::
|
|||
clean::
|
||||
rm -f *.o *.so *~
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
86
Tools/WAD/Wad/Makefile.in
Normal file
86
Tools/WAD/Wad/Makefile.in
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
#######################################################################
|
||||
# WAD Makefile
|
||||
#
|
||||
# David Beazley
|
||||
# January 1, 2001
|
||||
#######################################################################
|
||||
|
||||
# These are the files that make up the WAD core
|
||||
WADSRCS = return.c default.c stack.c stab.c elf.c object.c init.c segment.c signal.c
|
||||
WADOBJS = return.o default.o stack.o stab.o elf.o object.o signal.o segment.o init.o
|
||||
INCLUDE = -I../Include -I. $(SINCLUDE)
|
||||
WADOPT = @WADOPT@
|
||||
|
||||
# Location of your Python installation
|
||||
PYINCLUDE = @PYINCLUDE@
|
||||
PYSRCS = wadpy.cxx
|
||||
PYOBJS = wadpy.o
|
||||
|
||||
# Location of your Tcl installation
|
||||
TCLINCLUDE = @TCLINCLUDE@
|
||||
TCLSRCS = wadtcl.cxx
|
||||
TCLOBJS = wadtcl.o
|
||||
|
||||
# Location of your Perl installation
|
||||
PERLINCLUDE = @PERL5EXT@
|
||||
PERLSRCS = wadpl.cxx
|
||||
PERLOBJS = wadpl.o
|
||||
|
||||
# C Compiler
|
||||
CC = @CC@
|
||||
CFLAGS = @CCSHARED@
|
||||
|
||||
# C++ Compiler
|
||||
CXX = @CXX@
|
||||
CXXFLAGS = @CXXSHARED@
|
||||
|
||||
# Linking options
|
||||
CLINK =
|
||||
CXXLINK = @CXXLINK@
|
||||
|
||||
# Rules for creation of a .o file from .cxx
|
||||
.SUFFIXES: .cxx
|
||||
.cxx.o:
|
||||
$(CXX) $(CXXFLAGS) $(WADOPT) $(INCLUDE) -c -o $*.o $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(WADOPT) $(INCLUDE) -c -o $*.o $<
|
||||
|
||||
wad: $(WADOBJS) main.o
|
||||
$(CXXLINK) $(WADOBJS) main.o -o libwad.so
|
||||
cp libwad.so ..
|
||||
|
||||
python: $(WADOBJS) $(PYOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(PYOBJS) -o libwadpy.so
|
||||
cp libwadpy.so ..
|
||||
|
||||
tcl: $(WADOBJS) $(TCLOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(TCLOBJS) -o libwadtcl.so
|
||||
cp libwadtcl.so ..
|
||||
|
||||
perl: wad_perl_handler.c $(WADOBJS) $(PERLOBJS)
|
||||
$(CXXLINK) $(WADOBJS) $(PERLOBJS) -o libwadpl.so
|
||||
cp libwadpl.so ..
|
||||
|
||||
wad_perl_handler.c:
|
||||
python makehandler.py
|
||||
|
||||
debug::
|
||||
cc -g debug.c $(INCLUDE) -L. -R. -lwad
|
||||
|
||||
plus::
|
||||
CC -g debug.cxx $(INCLUDE) -L. -R. -lwad
|
||||
|
||||
wc::
|
||||
wc $(SRCS)
|
||||
|
||||
semi::
|
||||
egrep ";" $(SRCS) wadpy.cxx | wc
|
||||
|
||||
|
||||
clean::
|
||||
rm -f *.o *.so *~
|
||||
|
||||
|
||||
|
||||
|
||||
375
Tools/WAD/configure.in
Normal file
375
Tools/WAD/configure.in
Normal file
|
|
@ -0,0 +1,375 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl NOTES:
|
||||
dnl * As of 1.34, we no longer use and test for "nope" to indicate
|
||||
dnl an empty variable. Instead, we use `VAR=' (set the variable
|
||||
dnl to nothing) and `test -z "$VAR"' or `test -n "$VAR"' as the
|
||||
dnl case may be. --ttn, 2000/08/04 12:11:26
|
||||
|
||||
AC_INIT(Include/wad.h)
|
||||
AC_PREREQ(2.0)
|
||||
|
||||
# Set name for machine-dependent library files
|
||||
AC_SUBST(MACHDEP)
|
||||
AC_MSG_CHECKING(MACHDEP)
|
||||
if test -z "$MACHDEP"
|
||||
then
|
||||
if test -f /usr/lib/NextStep/software_version; then
|
||||
set X `hostinfo | grep 'NeXT Mach.*:' | \
|
||||
sed -e 's/://' -e 's/\./_/'` && \
|
||||
ac_sys_system=next && ac_sys_release=$4
|
||||
MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
|
||||
else
|
||||
ac_sys_system=`uname -s`
|
||||
if test "$ac_sys_system" = "AIX" ; then
|
||||
ac_sys_release=`uname -v`
|
||||
else
|
||||
ac_sys_release=`uname -r`
|
||||
fi
|
||||
ac_md_system=`echo $ac_sys_system |
|
||||
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
||||
ac_md_release=`echo $ac_sys_release |
|
||||
tr -d '[/ ]' | sed 's/\..*//'`
|
||||
MACHDEP="$ac_md_system$ac_md_release"
|
||||
fi
|
||||
case MACHDEP in
|
||||
'') MACHDEP=unknown;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($MACHDEP)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_SUBST(AR)
|
||||
AC_CHECK_PROGS(AR, ar aal, ar)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
dnl Checks for library functions.
|
||||
|
||||
# Set info about shared libraries.
|
||||
AC_SUBST(SO)
|
||||
AC_SUBST(LDSHARED)
|
||||
AC_SUBST(CCSHARED)
|
||||
|
||||
# SO is the extension of shared libraries `(including the dot!)
|
||||
# -- usually .so, .sl on HP-UX
|
||||
AC_MSG_CHECKING(SO)
|
||||
if test -z "$SO"
|
||||
then
|
||||
case $ac_sys_system in
|
||||
hp*|HP*) SO=.sl;;
|
||||
*) SO=.so;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($SO)
|
||||
|
||||
# WAD Options
|
||||
AC_SUBST(WADOPT)
|
||||
AC_MSG_CHECKING(WADOPT)
|
||||
if test -z "$WADOPT"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
SunOS/5*) WADOPT="-DWAD_SOLARIS";;
|
||||
Linux*) WADOPT="-DWAD_LINUX";;
|
||||
*) WADOPT="-DWAD_UNKWOWN";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($WADOPT)
|
||||
|
||||
|
||||
# LDSHARED is the ld *command* used to create shared library
|
||||
# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
|
||||
# (Shared libraries in this instance are shared modules to be loaded into
|
||||
# Python, as opposed to building Python itself as a shared library.)
|
||||
AC_MSG_CHECKING(LDSHARED)
|
||||
if test -z "$LDSHARED"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/4*) LDSHARED="ld";;
|
||||
SunOS/5*) LDSHARED="ld -G";;
|
||||
hp*|HP*) LDSHARED="ld -b";;
|
||||
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
|
||||
DYNIX/ptx*) LDSHARED="ld -G";;
|
||||
next/*)
|
||||
if test "$ns_dyld"
|
||||
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
|
||||
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
|
||||
fi
|
||||
if test "$with_next_framework" ; then
|
||||
LDSHARED="$LDSHARED \$(LDLIBRARY)"
|
||||
fi ;;
|
||||
Linux*) LDSHARED="gcc -shared";;
|
||||
dgux*) LDSHARED="ld -G";;
|
||||
FreeBSD*/3*) LDSHARED="gcc -shared";;
|
||||
FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
|
||||
NetBSD*)
|
||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
then
|
||||
LDSHARED="cc -shared"
|
||||
else
|
||||
LDSHARED="ld -Bshareable"
|
||||
fi;;
|
||||
SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
|
||||
*) LDSHARED="ld";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($LDSHARED)
|
||||
|
||||
|
||||
# CXXSHARED is the C++ *command* used to create shared library
|
||||
AC_SUBST(CXXLINK)
|
||||
|
||||
AC_MSG_CHECKING(CXXLINK)
|
||||
if test -z "$CXXLINK"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
SunOS/5*) if test "$GCC" = yes;
|
||||
then CXXLINK="g++ -shared";
|
||||
else CXXLINK="CC -G";
|
||||
fi;;
|
||||
Linux*) CXXLINK="g++ -shared";;
|
||||
*) CXXLINK="g++";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CXXLINK)
|
||||
|
||||
# CCSHARED are the C *flags* used to create objects to go into a shared
|
||||
# library (module) -- this is only needed for a few systems
|
||||
AC_MSG_CHECKING(CCSHARED)
|
||||
if test -z "$CCSHARED"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
hp*|HP*) if test "$GCC" = yes;
|
||||
then CCSHARED="-fpic";
|
||||
else CCSHARED="+z";
|
||||
fi;;
|
||||
Linux*) CCSHARED="-fpic";;
|
||||
FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
|
||||
NetBSD*) CCSHARED="-fPIC";;
|
||||
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
||||
IRIX*/6*) case $CC in
|
||||
*gcc*) CCSHARED="-shared";;
|
||||
*) CCSHARED="";;
|
||||
esac;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CCSHARED)
|
||||
|
||||
AC_SUBST(CXXSHARED)
|
||||
# CCSHARED are the C *flags* used to create objects to go into a shared
|
||||
# library (module) -- this is only needed for a few systems
|
||||
AC_MSG_CHECKING(CXXSHARED)
|
||||
if test -z "$CXXSHARED"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
Linux*) CXXSHARED="-fpic";;
|
||||
SunOS/5*) if test "$GCC" = yes;
|
||||
then CXXSHARED="-fpic";
|
||||
else CXXSHARED="-Kpic";
|
||||
fi;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CXXSHARED)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Try to locate the Tcl package
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
TCLINCLUDE=
|
||||
TCLLIB=
|
||||
TCLPACKAGE=
|
||||
MAKETCL=
|
||||
|
||||
AC_ARG_WITH(tcl,[ --with-tcl=path Set location of Tcl package],[
|
||||
TCLPACKAGE="$withval"], [TCLPACKAGE=])
|
||||
AC_ARG_WITH(tclincl,[ --with-tclincl=path Set location of Tcl include directory],[
|
||||
TCLINCLUDE="-I$withval"], [TCLINCLUDE=])
|
||||
AC_ARG_WITH(tcllib,[ --with-tcllib=path Set location of Tcl library directory],[
|
||||
TCLLIB="-L$withval"], [TCLLIB=])
|
||||
|
||||
if test -z "$TCLINCLUDE"; then
|
||||
if test -n "$TCLPACKAGE"; then
|
||||
TCLINCLUDE="-I$TCLPACKAGE/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$TCLLIB"; then
|
||||
if test -n "$TCLPACKAGE"; then
|
||||
TCLLIB="-L$TCLPACKAGE/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Tcl header files)
|
||||
if test -z "$TCLINCLUDE"; then
|
||||
AC_TRY_CPP([#include <tcl.h>], , TCLINCLUDE="")
|
||||
if test -z "$TCLINCLUDE"; then
|
||||
dirs="$prefix/include /usr/local/include /usr/include /opt/local/include /home/sci/local/include"
|
||||
for i in $dirs ; do
|
||||
if test -r $i/tcl.h; then
|
||||
AC_MSG_RESULT($i)
|
||||
TCLINCLUDE="-I$i"
|
||||
MAKETCL="tcl"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test -z "$TCLINCLUDE"; then
|
||||
TCLINCLUDE=""
|
||||
MAKETCL=""
|
||||
AC_MSG_RESULT(not found)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT($TCLINCLUDE)
|
||||
fi
|
||||
|
||||
AC_SUBST(TCLINCLUDE)
|
||||
AC_SUBST(MAKETCL)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Look for Python
|
||||
#----------------------------------------------------------------
|
||||
|
||||
PYINCLUDE=
|
||||
MAKEPYTHON=
|
||||
PYLIB=
|
||||
PYPACKAGE=
|
||||
|
||||
AC_ARG_WITH(py,[ --with-py=path Set location of Python],[
|
||||
PYPACKAGE="$withval"], [PYPACKAGE=])
|
||||
AC_ARG_WITH(pyincl,[ --with-pyincl=path Set location of Python include directory],[
|
||||
PYINCLUDE="$withval"], [PYINCLUDE=])
|
||||
AC_ARG_WITH(pylib,[ --with-pylib=path Set location of Python library directory],[
|
||||
PYLIB="$withval"], [PYLIB=])
|
||||
|
||||
if test -z "$PYINCLUDE"; then
|
||||
if test -n "$PYPACKAGE"; then
|
||||
PYINCLUDE="$PYPACKAGE/include"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$PYLIB"; then
|
||||
if test -n "$PYPACKAGE"; then
|
||||
PYLIB="$PYPACKAGE/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for Python header files)
|
||||
|
||||
dirs="$PYINCLUDE $PYINCLUDE/python1.6 $PYINCLUDE/python1.5 $PYINCLUDE/python1.4 $PYINCLUDE/Py $prefix=/include/python1.6 $prefix/include/python1.5 $prefix/include/python1.4 /usr/local/include/python1.6 /usr/local/include/python1.5 /usr/include/python1.5 /usr/local/include/python1.4 /usr/include/python1.4 $prefix/include/Py /usr/local/include/Py /usr/include/Py"
|
||||
for i in $dirs ; do
|
||||
if test -r $i/Python.h; then
|
||||
AC_MSG_RESULT($i)
|
||||
PYINCLUDE="-I$i"
|
||||
MAKEPYTHON="python"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$PYINCLUDE"; then
|
||||
PYINCLUDE=""
|
||||
MAKEPYTHON=""
|
||||
AC_MSG_RESULT(not found)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Python library)
|
||||
dirs="$PYLIB $PYLIB/config $PYLIB/lib $PYLIB/python1.6/config $PYLIB/python1.5/config $PYLIB/python1.4/config $PYLIB/python/lib $prefix/lib/python1.6/config $prefix/lib/python1.5/config $prefix/lib/python1.4/config /usr/local/lib/python1.6/config /usr/local/lib/python1.5/config /usr/lib/python1.5 /usr/local/lib/python1.4/config /usr/lib/python1.4 $prefix/lib/python/lib /usr/local/lib/python/lib /usr/lib/python/lib /home/sci/local/lib/python"
|
||||
|
||||
for i in $dirs ; do
|
||||
if test -r $i/libpython1.6.a; then
|
||||
AC_MSG_RESULT($i)
|
||||
PYLIB="$i"
|
||||
PYINCLUDE="$PYINCLUDE -I$i"
|
||||
PYLINK="-lpython1.6"
|
||||
break
|
||||
fi
|
||||
if test -r $i/libpython1.5.a; then
|
||||
AC_MSG_RESULT($i)
|
||||
PYLIB="$i"
|
||||
PYINCLUDE="$PYINCLUDE -I$i"
|
||||
PYLINK="-lpython1.5"
|
||||
break
|
||||
fi
|
||||
if test -r $i/libPython.a; then
|
||||
AC_MSG_RESULT($i)
|
||||
PYLIB="$i"
|
||||
PYINCLUDE="$PYINCLUDE -I$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
AC_SUBST(PYINCLUDE)
|
||||
AC_SUBST(PYLIB)
|
||||
AC_SUBST(PYLINK)
|
||||
AC_SUBST(MAKEPYTHON)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Look for Perl5
|
||||
#----------------------------------------------------------------
|
||||
|
||||
PERLBIN=
|
||||
MAKEPERL=
|
||||
|
||||
AC_ARG_WITH(perl5,[ --with-perl5=path Set location of Perl5 executable],[ PERLBIN="$withval"], [PERLBIN=])
|
||||
|
||||
# First figure out what the name of Perl5 is
|
||||
|
||||
if test -z "$PERLBIN"; then
|
||||
AC_CHECK_PROGS(PERL, perl5.004 perl5.003 perl5.002 perl5.001 perl5 perl)
|
||||
else
|
||||
PERL="$PERLBIN"
|
||||
fi
|
||||
AC_MSG_CHECKING(for Perl5 header files)
|
||||
if test -n "$PERL"; then
|
||||
PERL5DIR=`($PERL -e 'use Config; print $Config{archlib};') 2>/dev/null`
|
||||
if test "$PERL5DIR" != ""; then
|
||||
dirs="$PERL5DIR $PERL5DIR/CORE"
|
||||
PERL5EXT=none
|
||||
for i in $dirs; do
|
||||
if test -r $i/perl.h; then
|
||||
AC_MSG_RESULT($i)
|
||||
PERL5EXT="-I$i"
|
||||
MAKEPERL="perl"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test "$PERL5EXT" = none; then
|
||||
PERL5EXT=""
|
||||
MAKEPERL=""
|
||||
AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(unable to determine perl5 configuration)
|
||||
PERL5EXT=""
|
||||
MAKEPERL=""
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(could not figure out how to run perl5)
|
||||
PERL5EXT=""
|
||||
MAKEPERL=""
|
||||
fi
|
||||
|
||||
AC_SUBST(PERL5EXT)
|
||||
AC_SUBST(MAKEPERL)
|
||||
|
||||
# NOTE: The following ref to `Source' should NOT be prefixed w/ `$srcdir/'.
|
||||
# We can remove it if `Source' ever has a generated file but not before.
|
||||
test -d Source || mkdir Source
|
||||
|
||||
dnl We use the following in `AC_OUTPUT' and "make distclean".
|
||||
configure_substituted_files=`echo \
|
||||
Wad/Makefile \
|
||||
Makefile \
|
||||
`
|
||||
AC_SUBST(configure_substituted_files)
|
||||
|
||||
AC_OUTPUT([$configure_substituted_files])
|
||||
|
||||
dnl configure.in ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue