Commit 71ac15c2 authored by Erick Gallesio's avatar Erick Gallesio

Fixed Makefile machinery for libffi integration

parent 62a9de08
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
# #
# Author: Erick Gallesio [eg@unice.fr] # Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg) # Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 19-Jun-2007 11:55 (eg) # Last file update: 3-May-2008 19:58 (eg)
EXTRA_DIST = EXTRA_DIST =
SUBDIRS = @PCRE@ @GC@ @GMP@ @CINVOKE@ src utils lib @GTKLOS@ \ SUBDIRS = @PCRE@ @GC@ @GMP@ @LIBFFI@ src utils lib @GTKLOS@ \
@EXAMPLES@ pkgman extensions tests doc @EXAMPLES@ pkgman extensions tests doc
SVN_URL = @SVN_URL@/STklos SVN_URL = @SVN_URL@/STklos
VERSION_TAG = @PACKAGE@-@VERSION@ VERSION_TAG = @PACKAGE@-@VERSION@
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# #
# Author: Erick Gallesio [eg@unice.fr] # Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg) # Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 19-Jun-2007 11:55 (eg) # Last file update: 3-May-2008 19:58 (eg)
VPATH = @srcdir@ VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
...@@ -87,7 +87,6 @@ CALLCC_STK = @CALLCC_STK@ ...@@ -87,7 +87,6 @@ CALLCC_STK = @CALLCC_STK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CINVOKE = @CINVOKE@
COMPOBJ = @COMPOBJ@ COMPOBJ = @COMPOBJ@
COMPSRC = @COMPSRC@ COMPSRC = @COMPSRC@
CPP = @CPP@ CPP = @CPP@
...@@ -126,6 +125,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ...@@ -126,6 +125,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@ LDAP_LIB = @LDAP_LIB@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI = @LIBFFI@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
...@@ -146,7 +146,6 @@ PCRE = @PCRE@ ...@@ -146,7 +146,6 @@ PCRE = @PCRE@
PCREINC = @PCREINC@ PCREINC = @PCREINC@
PCRELIB = @PCRELIB@ PCRELIB = @PCRELIB@
PCRETARGET = @PCRETARGET@ PCRETARGET = @PCRETARGET@
PERLINT = @PERLINT@
PREFIX = @PREFIX@ PREFIX = @PREFIX@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SCMDIR = @SCMDIR@ SCMDIR = @SCMDIR@
...@@ -205,7 +204,7 @@ target_alias = @target_alias@ ...@@ -205,7 +204,7 @@ target_alias = @target_alias@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
EXTRA_DIST = EXTRA_DIST =
SUBDIRS = @PCRE@ @GC@ @GMP@ @CINVOKE@ src utils lib @GTKLOS@ \ SUBDIRS = @PCRE@ @GC@ @GMP@ @LIBFFI@ src utils lib @GTKLOS@ \
@EXAMPLES@ pkgman extensions tests doc @EXAMPLES@ pkgman extensions tests doc
VERSION_TAG = @PACKAGE@-@VERSION@ VERSION_TAG = @PACKAGE@-@VERSION@
......
...@@ -701,7 +701,6 @@ NO_THREAD_FALSE ...@@ -701,7 +701,6 @@ NO_THREAD_FALSE
GTK_CONFIG GTK_CONFIG
GNOME_CONFIG GNOME_CONFIG
LIBOBJS LIBOBJS
PERLINT
STKCFLAGS STKCFLAGS
HAVE_DLOPEN HAVE_DLOPEN
HAVE_FFI HAVE_FFI
...@@ -742,7 +741,7 @@ SVN_URL ...@@ -742,7 +741,7 @@ SVN_URL
THREADS THREADS
LURCDIR LURCDIR
CALLCC_STK CALLCC_STK
CINVOKE LIBFFI
LTLIBOBJS' LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
ac_precious_vars='build_alias ac_precious_vars='build_alias
...@@ -6782,45 +6781,6 @@ fi ...@@ -6782,45 +6781,6 @@ fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_PERLINT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$PERLINT"; then
ac_cv_prog_PERLINT="$PERLINT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_PERLINT=""yes""
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_prog_PERLINT" && ac_cv_prog_PERLINT=""no""
fi
fi
PERLINT=$ac_cv_prog_PERLINT
if test -n "$PERLINT"; then
{ echo "$as_me:$LINENO: result: $PERLINT" >&5
echo "${ECHO_T}$PERLINT" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
# Check whether --enable-ffi was given. # Check whether --enable-ffi was given.
if test "${enable_ffi+set}" = set; then if test "${enable_ffi+set}" = set; then
enableval=$enable_ffi; USER_FFI="no" enableval=$enable_ffi; USER_FFI="no"
...@@ -6829,18 +6789,19 @@ else ...@@ -6829,18 +6789,19 @@ else
fi fi
if test "$PERLINT" = "yes" -a "$USER_FFI" = "yes" ;then if test "$USER_FFI" = "yes" ;then
# We have perl and user did't disable FFI. We can try to configure C/invoke echo "Configuring libffi"
echo "Configuring C/Invoke" (cd ffi; CC=${CC} CFLAGS=${CFLAGS} ./configure \
(cd cinvoke; perl configure.pl --prefix=$prefix) --disable-structs --disable-raw-api --disable-shared \
LIBS="$LIBS ../cinvoke/lib/libcinvoke.a" --prefix=$prefix)
CFLAGS="$CFLAGS -I../cinvoke/lib" LIBS="$LIBS ../ffi/.libs/libffi.a"
CINVOKE="cinvoke" CFLAGS="$CFLAGS -I../ffi/include"
LIBFFI="ffi"
HAVE_FFI="#define HAVE_FFI 1" HAVE_FFI="#define HAVE_FFI 1"
FFI="yes" FFI="yes"
else else
echo "Disabling FFI support" echo "Disabling FFI support"
CINVOKE="" LIBFFI=""
HAVE_FFI="" HAVE_FFI=""
FFI="no" FFI="no"
fi fi
...@@ -7761,7 +7722,6 @@ NO_THREAD_FALSE!$NO_THREAD_FALSE$ac_delim ...@@ -7761,7 +7722,6 @@ NO_THREAD_FALSE!$NO_THREAD_FALSE$ac_delim
GTK_CONFIG!$GTK_CONFIG$ac_delim GTK_CONFIG!$GTK_CONFIG$ac_delim
GNOME_CONFIG!$GNOME_CONFIG$ac_delim GNOME_CONFIG!$GNOME_CONFIG$ac_delim
LIBOBJS!$LIBOBJS$ac_delim LIBOBJS!$LIBOBJS$ac_delim
PERLINT!$PERLINT$ac_delim
STKCFLAGS!$STKCFLAGS$ac_delim STKCFLAGS!$STKCFLAGS$ac_delim
HAVE_DLOPEN!$HAVE_DLOPEN$ac_delim HAVE_DLOPEN!$HAVE_DLOPEN$ac_delim
HAVE_FFI!$HAVE_FFI$ac_delim HAVE_FFI!$HAVE_FFI$ac_delim
...@@ -7770,6 +7730,7 @@ GC!$GC$ac_delim ...@@ -7770,6 +7730,7 @@ GC!$GC$ac_delim
GCLIB!$GCLIB$ac_delim GCLIB!$GCLIB$ac_delim
GCINC!$GCINC$ac_delim GCINC!$GCINC$ac_delim
GMP!$GMP$ac_delim GMP!$GMP$ac_delim
GMPLIB!$GMPLIB$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
...@@ -7811,7 +7772,6 @@ _ACEOF ...@@ -7811,7 +7772,6 @@ _ACEOF
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF cat >conf$$subs.sed <<_ACEOF
GMPLIB!$GMPLIB$ac_delim
GMPINC!$GMPINC$ac_delim GMPINC!$GMPINC$ac_delim
PREFIX!$PREFIX$ac_delim PREFIX!$PREFIX$ac_delim
SCMDIR!$SCMDIR$ac_delim SCMDIR!$SCMDIR$ac_delim
...@@ -7843,11 +7803,11 @@ SVN_URL!$SVN_URL$ac_delim ...@@ -7843,11 +7803,11 @@ SVN_URL!$SVN_URL$ac_delim
THREADS!$THREADS$ac_delim THREADS!$THREADS$ac_delim
LURCDIR!$LURCDIR$ac_delim LURCDIR!$LURCDIR$ac_delim
CALLCC_STK!$CALLCC_STK$ac_delim CALLCC_STK!$CALLCC_STK$ac_delim
CINVOKE!$CINVOKE$ac_delim LIBFFI!$LIBFFI$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 34; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 33; then
break break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
...@@ -2,7 +2,7 @@ dnl configure.in for STklos ...@@ -2,7 +2,7 @@ dnl configure.in for STklos
dnl dnl
dnl Author: Erick Gallesio [eg@unice.fr] dnl Author: Erick Gallesio [eg@unice.fr]
dnl Creation date: 28-Dec-1999 21:19 (eg) dnl Creation date: 28-Dec-1999 21:19 (eg)
dnl Last file update: 31-Jan-2008 16:04 (eg) dnl Last file update: 3-May-2008 19:57 (eg)
AC_INIT(src/stklos.c) AC_INIT(src/stklos.c)
...@@ -389,24 +389,23 @@ fi ...@@ -389,24 +389,23 @@ fi
dnl dnl
dnl FFI support dnl FFI support
dnl dnl
AC_CHECK_PROG(PERLINT, [perl], "yes", "no")
AC_ARG_ENABLE(ffi, AC_ARG_ENABLE(ffi,
[ --disable-ffi disable FFI support], [ --disable-ffi disable FFI support],
USER_FFI="no", USER_FFI="yes") USER_FFI="no", USER_FFI="yes")
if test "$PERLINT" = "yes" -a "$USER_FFI" = "yes" ;then if test "$USER_FFI" = "yes" ;then
# We have perl and user did't disable FFI. We can try to configure C/invoke echo "Configuring libffi"
echo "Configuring C/Invoke" (cd ffi; CC=${CC} CFLAGS=${CFLAGS} ./configure \
(cd cinvoke; perl configure.pl --prefix=$prefix) --disable-structs --disable-raw-api --disable-shared \
LIBS="$LIBS ../cinvoke/lib/libcinvoke.a" --prefix=$prefix)
CFLAGS="$CFLAGS -I../cinvoke/lib" LIBS="$LIBS ../ffi/.libs/libffi.a"
CINVOKE="cinvoke" CFLAGS="$CFLAGS -I../ffi/include"
LIBFFI="ffi"
HAVE_FFI="#define HAVE_FFI 1" HAVE_FFI="#define HAVE_FFI 1"
FFI="yes" FFI="yes"
else else
echo "Disabling FFI support" echo "Disabling FFI support"
CINVOKE="" LIBFFI=""
HAVE_FFI="" HAVE_FFI=""
FFI="no" FFI="no"
fi fi
...@@ -557,7 +556,7 @@ AC_SUBST(SVN_URL) ...@@ -557,7 +556,7 @@ AC_SUBST(SVN_URL)
AC_SUBST(THREADS) AC_SUBST(THREADS)
AC_SUBST(LURCDIR) AC_SUBST(LURCDIR)
AC_SUBST(CALLCC_STK) AC_SUBST(CALLCC_STK)
AC_SUBST(CINVOKE) AC_SUBST(LIBFFI)
AC_OUTPUT(Makefile src/Makefile src/extraconf.h doc/Makefile AC_OUTPUT(Makefile src/Makefile src/extraconf.h doc/Makefile
lib/Makefile gtklos/Makefile gtklos/gtklosconf.h lib/Makefile gtklos/Makefile gtklos/gtklosconf.h
......
...@@ -40,7 +40,7 @@ subdir = doc ...@@ -40,7 +40,7 @@ subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/stklos-compile.1.in $(srcdir)/stklos-config.1.in \ $(srcdir)/stklos-compile.1.in $(srcdir)/stklos-config.1.in \
$(srcdir)/stklos-genlex.1.in $(srcdir)/stklos-install.1.in \ $(srcdir)/stklos-genlex.1.in $(srcdir)/stklos-install.1.in \
$(srcdir)/stklos-pkg.1.in $(srcdir)/stklos.1.in TODO $(srcdir)/stklos-pkg.1.in $(srcdir)/stklos.1.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
...@@ -81,7 +81,6 @@ CALLCC_STK = @CALLCC_STK@ ...@@ -81,7 +81,6 @@ CALLCC_STK = @CALLCC_STK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CINVOKE = @CINVOKE@
COMPOBJ = @COMPOBJ@ COMPOBJ = @COMPOBJ@
COMPSRC = @COMPSRC@ COMPSRC = @COMPSRC@
CPP = @CPP@ CPP = @CPP@
...@@ -120,6 +119,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ...@@ -120,6 +119,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@ LDAP_LIB = @LDAP_LIB@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI = @LIBFFI@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
...@@ -140,7 +140,6 @@ PCRE = @PCRE@ ...@@ -140,7 +140,6 @@ PCRE = @PCRE@
PCREINC = @PCREINC@ PCREINC = @PCREINC@
PCRELIB = @PCRELIB@ PCRELIB = @PCRELIB@
PCRETARGET = @PCRETARGET@ PCRETARGET = @PCRETARGET@
PERLINT = @PERLINT@
PREFIX = @PREFIX@ PREFIX = @PREFIX@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SCMDIR = @SCMDIR@ SCMDIR = @SCMDIR@
......
...@@ -67,7 +67,6 @@ CALLCC_STK = @CALLCC_STK@ ...@@ -67,7 +67,6 @@ CALLCC_STK = @CALLCC_STK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CINVOKE = @CINVOKE@
COMPOBJ = @COMPOBJ@ COMPOBJ = @COMPOBJ@
COMPSRC = @COMPSRC@ COMPSRC = @COMPSRC@
CPP = @CPP@ CPP = @CPP@
...@@ -106,6 +105,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ...@@ -106,6 +105,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@ LDAP_LIB = @LDAP_LIB@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI = @LIBFFI@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
...@@ -126,7 +126,6 @@ PCRE = @PCRE@ ...@@ -126,7 +126,6 @@ PCRE = @PCRE@
PCREINC = @PCREINC@ PCREINC = @PCREINC@
PCRELIB = @PCRELIB@ PCRELIB = @PCRELIB@
PCRETARGET = @PCRETARGET@ PCRETARGET = @PCRETARGET@
PERLINT = @PERLINT@
PREFIX = @PREFIX@ PREFIX = @PREFIX@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SCMDIR = @SCMDIR@ SCMDIR = @SCMDIR@
......
...@@ -63,7 +63,6 @@ CALLCC_STK = @CALLCC_STK@ ...@@ -63,7 +63,6 @@ CALLCC_STK = @CALLCC_STK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CINVOKE = @CINVOKE@
COMPOBJ = @COMPOBJ@ COMPOBJ = @COMPOBJ@
COMPSRC = @COMPSRC@ COMPSRC = @COMPSRC@
CPP = @CPP@ CPP = @CPP@
...@@ -102,6 +101,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ...@@ -102,6 +101,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@ LDAP_LIB = @LDAP_LIB@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI = @LIBFFI@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
...@@ -122,7 +122,6 @@ PCRE = @PCRE@ ...@@ -122,7 +122,6 @@ PCRE = @PCRE@
PCREINC = @PCREINC@ PCREINC = @PCREINC@
PCRELIB = @PCRELIB@ PCRELIB = @PCRELIB@
PCRETARGET = @PCRETARGET@ PCRETARGET = @PCRETARGET@
PERLINT = @PERLINT@
PREFIX = @PREFIX@ PREFIX = @PREFIX@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SCMDIR = @SCMDIR@ SCMDIR = @SCMDIR@
......
...@@ -39,7 +39,7 @@ PRE_UNINSTALL = : ...@@ -39,7 +39,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
subdir = extensions subdir = extensions
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/extconf.h.in TODO $(srcdir)/extconf.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
...@@ -73,7 +73,6 @@ CALLCC_STK = @CALLCC_STK@ ...@@ -73,7 +73,6 @@ CALLCC_STK = @CALLCC_STK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ @SH_COMP_FLAGS@ @GTK_CONFIG_CFLAGS@ @GCINC@ $(INCLUDES) CFLAGS = @CFLAGS@ @SH_COMP_FLAGS@ @GTK_CONFIG_CFLAGS@ @GCINC@ $(INCLUDES)
CINVOKE = @CINVOKE@
COMPOBJ = @COMPOBJ@ COMPOBJ = @COMPOBJ@
COMPSRC = @COMPSRC@ COMPSRC = @COMPSRC@
CPP = @CPP@ CPP = @CPP@
...@@ -112,6 +111,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ ...@@ -112,6 +111,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@ LDAP_LIB = @LDAP_LIB@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBFFI = @LIBFFI@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
...@@ -132,7 +132,6 @@ PCRE = @PCRE@ ...@@ -132,7 +132,6 @@ PCRE = @PCRE@
PCREINC = @PCREINC@ PCREINC = @PCREINC@
PCRELIB = @PCRELIB@ PCRELIB = @PCRELIB@
PCRETARGET = @PCRETARGET@ PCRETARGET = @PCRETARGET@
PERLINT = @PERLINT@
PREFIX = @PREFIX@ PREFIX = @PREFIX@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
SCMDIR = @SCMDIR@ SCMDIR = @SCMDIR@
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = foreign subdir-objects AUTOMAKE_OPTIONS = foreign subdir-objects
SUBDIRS = include man SUBDIRS = include testsuite man
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
......
...@@ -333,7 +333,7 @@ toolexeclibdir = @toolexeclibdir@ ...@@ -333,7 +333,7 @@ toolexeclibdir = @toolexeclibdir@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign subdir-objects AUTOMAKE_OPTIONS = foreign subdir-objects
SUBDIRS = include man SUBDIRS = include testsuite man
EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \ src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
......
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = foreign dejagnu
# Setup the testing framework, if you have one
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
echo $(top_builddir)/../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
AM_RUNTESTFLAGS =
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = config/default.exp lib/libffi-dg.exp \
lib/target-libpath.exp lib/wrapper.exp libffi.call/call.exp \
libffi.call/closure_fn0.c libffi.call/closure_fn1.c \
libffi.call/closure_fn2.c libffi.call/closure_fn3.c \
libffi.call/closure_fn4.c libffi.call/closure_fn5.c \
libffi.call/closure_fn6.c libffi.call/closure_stdcall.c \
libffi.call/cls_1_1byte.c libffi.call/cls_12byte.c \
libffi.call/cls_16byte.c libffi.call/cls_18byte.c \
libffi.call/cls_19byte.c libffi.call/cls_20byte1.c \
libffi.call/cls_20byte.c libffi.call/cls_24byte.c \
libffi.call/cls_2byte.c libffi.call/cls_3_1byte.c \
libffi.call/cls_3byte1.c libffi.call/cls_3byte2.c \
libffi.call/cls_4_1byte.c libffi.call/cls_4byte.c \
libffi.call/cls_5_1_byte.c libffi.call/cls_5byte.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_64byte.c \
libffi.call/cls_6byte.c libffi.call/cls_7_1_byte.c \
libffi.call/cls_7byte.c libffi.call/cls_8byte.c \
libffi.call/cls_9byte1.c libffi.call/cls_9byte2.c \
libffi.call/cls_align_double.c libffi.call/cls_align_float.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_align_pointer.c \
libffi.call/cls_align_sint16.c libffi.call/cls_align_sint32.c \
libffi.call/cls_align_sint64.c libffi.call/cls_align_uint16.c \
libffi.call/cls_align_uint32.c libffi.call/cls_align_uint64.c \
libffi.call/cls_double.c libffi.call/cls_float.c \
libffi.call/cls_multi_schar.c libffi.call/cls_multi_sshort.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_uchar.c \
libffi.call/cls_multi_ushort.c libffi.call/cls_multi_ushortchar.c \
libffi.call/cls_schar.c libffi.call/cls_sint.c \
libffi.call/cls_sshort.c libffi.call/cls_uchar.c \
libffi.call/cls_uint.c libffi.call/cls_ulonglong.c \
libffi.call/cls_ushort.c libffi.call/ffitest.h libffi.call/float1.c \
libffi.call/float2.c libffi.call/float3.c libffi.call/float4.c \
libffi.call/float.c libffi.call/many.c libffi.call/many_win32.c \
libffi.call/negint.c libffi.call/nested_struct10.c \
libffi.call/nested_struct1.c libffi.call/nested_struct2.c \
libffi.call/nested_struct3.c libffi.call/nested_struct4.c \
libffi.call/nested_struct5.c libffi.call/nested_struct6.c \
libffi.call/nested_struct7.c libffi.call/nested_struct8.c \
libffi.call/nested_struct9.c libffi.call/nested_struct.c \
libffi.call/problem1.c libffi.call/promotion.c \
libffi.call/pyobjc-tc.c libffi.call/return_dbl1.c \
libffi.call/return_dbl2.c libffi.call/return_dbl.c \
libffi.call/return_fl1.c libffi.call/return_fl2.c \
libffi.call/return_fl3.c libffi.call/return_fl.c \
libffi.call/return_ldl.c libffi.call/return_ll1.c \
libffi.call/return_ll.c libffi.call/return_sc.c \
libffi.call/return_sl.c libffi.call/return_uc.c \
libffi.call/return_ul.c libffi.call/strlen.c \
libffi.call/strlen_win32.c libffi.call/struct1.c \
libffi.call/struct2.c libffi.call/struct3.c libffi.call/struct4.c \
libffi.call/struct5.c libffi.call/struct6.c libffi.call/struct7.c \
libffi.call/struct8.c libffi.call/struct9.c \
libffi.special/ffitestcxx.h libffi.special/special.exp \
libffi.special/unwindtest.cc libffi.special/unwindtest_ffi_call.cc
This diff is collapsed.
load_lib "standard.exp"
# Copyright (C) 2003, 2005, 2008 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
proc load_gcc_lib { filename } {
global srcdir
load_file $srcdir/lib/$filename
}
load_lib dg.exp
load_lib libgloss.exp
load_gcc_lib target-libpath.exp
load_gcc_lib wrapper.exp
# Define libffi callbacks for dg.exp.
proc libffi-dg-test-1 { target_compile prog do_what extra_tool_flags } {
# To get all \n in dg-output test strings to match printf output
# in a system that outputs it as \015\012 (i.e. not just \012), we
# need to change all \n into \r?\n. As there is no dejagnu flag
# or hook to do that, we simply change the text being tested.
# Unfortunately, we have to know that the variable is called
# dg-output-text and lives in the caller of libffi-dg-test, which
# is two calls up. Overriding proc dg-output would be longer and
# would necessarily have the same assumption.
upvar 2 dg-output-text output_match
if { [llength $output_match] > 1 } {
regsub -all "\n" [lindex $output_match 1] "\r?\n" x
set output_match [lreplace $output_match 1 1 $x]
}
# Set up the compiler flags, based on what we're going to do.
set options [list]
switch $do_what {
"compile" {
set compile_type "assembly"
set output_file "[file rootname [file tail $prog]].s"
}
"link" {
set compile_type "executable"
set output_file "[file rootname [file tail $prog]].exe"
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
"run" {
set compile_type "executable"
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file;
}
default {
perror "$do_what: not a valid dg-do keyword"
return ""
}
}
if { $extra_tool_flags != "" } {
lappend options "additional_flags=$extra_tool_flags"
}
set comp_output [libffi_target_compile "$prog" "$output_file" "$compile_type" $options];
return [list $comp_output $output_file]
}
proc libffi-dg-test { prog do_what extra_tool_flags } {
return [libffi-dg-test-1 target_compile $prog $do_what $extra_tool_flags]
}
proc libffi-init { args } {
global gluefile wrap_flags;
global srcdir
global blddirffi
global objdir
global TOOL_OPTIONS
global tool
global libffi_include
global libffi_link_flags
global tool_root_dir
global ld_library_path
set blddirffi [pwd]/..