make configuration changes to better support C++ and deeper included packages.

This commit is contained in:
Vitor Santos Costa 2009-11-18 09:29:26 +00:00
parent 939eda0050
commit 167e129222
5 changed files with 10915 additions and 2260 deletions

13139
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -379,9 +379,11 @@ then
if test "$debugyap" = "yes" if test "$debugyap" = "yes"
then then
CFLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes" CFLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
CPPFLAGS="-O -g -Wall"
C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes" C_INTERF_FLAGS="-O -g -Wall -Wstrict-prototypes -Wmissing-prototypes"
else else
CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes" CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes"
CPPFLAGS="-O3 -fomit-frame-pointer -Wall"
case "`$CC --version < /dev/null`" in case "`$CC --version < /dev/null`" in
*3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;; *3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;;
esac esac
@ -390,11 +392,13 @@ then
case "$target_cpu" in case "$target_cpu" in
i*86*) i*86*)
CFLAGS="-DBP_FREE $CFLAGS" CFLAGS="-DBP_FREE $CFLAGS"
CPPFLAGS="-DBP_FREE $CPPFLAGS"
;; ;;
sparc*) sparc*)
case "$target_os" in case "$target_os" in
*solaris[2-9]*) dnl *solaris[2-9]*) dnl
CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS" CFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFLAGS"
CPPFLAGS="-mno-app-regs -DOPTIMISE_ALL_REGS_FOR_SPARC=1 $CFPPLAGS"
;; ;;
esac esac
;; ;;
@ -407,18 +411,23 @@ then
case "$target_cpu" in case "$target_cpu" in
athlon) athlon)
CFLAGS="-march=athlon $CFLAGS" CFLAGS="-march=athlon $CFLAGS"
CPPFLAGS="-march=athlon $CPPFLAGS"
;; ;;
i686*) i686*)
CFLAGS="-march=i686 $CFLAGS" CFLAGS="-march=i686 $CFLAGS"
CPPFLAGS="-march=i686 $CPPFLAGS"
;; ;;
i586*) i586*)
CFLAGS="-march=i586 $CFLAGS" CFLAGS="-march=i586 $CFLAGS"
CPPFLAGS="-march=i586 $CPPFLAGS"
;; ;;
i486*) i486*)
CFLAGS="-march=i486 $CFLAGS" CFLAGS="-march=i486 $CFLAGS"
CPPFLAGS="-march=i486 $CPPFLAGS"
;; ;;
i386*) i386*)
CFLAGS="-march=i386 $CFLAGS" CFLAGS="-march=i386 $CFLAGS"
CPPFLAGS="-march=i386 $CPPFLAGS"
;; ;;
esac esac
fi fi
@ -441,6 +450,7 @@ else
elif test "$CC" = "cl" elif test "$CC" = "cl"
then then
CFLAGS="/nologo" CFLAGS="/nologo"
CPPFLAGS="-/nologo"
CPP="/nologo /E" CPP="/nologo /E"
fi fi
;; ;;
@ -450,8 +460,10 @@ else
if test "$debugyap" = "yes" if test "$debugyap" = "yes"
then then
CFLAGS="-Ae -g -O" CFLAGS="-Ae -g -O"
CPPFLAGS="-Ae -g -O"
else else
CFLAGS="-Ae +O3 +Onolimit" CFLAGS="-Ae +O3 +Onolimit"
CPPFLAGS="-Ae +O3 +Onolimit"
fi fi
fi fi
dnl LDFLAGS="+e UserCPredicate $LDFLAGS" dnl LDFLAGS="+e UserCPredicate $LDFLAGS"
@ -754,6 +766,7 @@ dnl defaults
INSTALL_DLLS="#" INSTALL_DLLS="#"
EXTRA_OBJS="" EXTRA_OBJS=""
SHLIB_LD="#" SHLIB_LD="#"
SHLIB_LOWER_LD="#"
SHLIB_SWI_LD="#" SHLIB_SWI_LD="#"
DO_SECOND_LD="#" DO_SECOND_LD="#"
M4="m4" M4="m4"
@ -775,6 +788,7 @@ case "$target_os" in
then then
SHLIB_SUFFIX=".so" SHLIB_SUFFIX=".so"
SHLIB_LD="$CC -shared -export-dynamic" SHLIB_LD="$CC -shared -export-dynamic"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="$CC -shared -export-dynamic" SHLIB_SWI_LD="$CC -shared -export-dynamic"
DO_SECOND_LD="" DO_SECOND_LD=""
LIBS="$LIBS -ldl" LIBS="$LIBS -ldl"
@ -833,6 +847,7 @@ case "$target_os" in
#this tells ld to export all non-static symbols, #this tells ld to export all non-static symbols,
#otherwise no external predicates. #otherwise no external predicates.
SHLIB_LD="$CC -shared -export-dynamic" SHLIB_LD="$CC -shared -export-dynamic"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="$CC -shared -export-dynamic" SHLIB_SWI_LD="$CC -shared -export-dynamic"
DO_SECOND_LD="" DO_SECOND_LD=""
SHLIB_SUFFIX=".sl" SHLIB_SUFFIX=".sl"
@ -881,6 +896,7 @@ dnl Linux has both elf and a.out, in this case we found elf
SHLIB_SUFFIX=".so" SHLIB_SUFFIX=".so"
DO_SECOND_LD="" DO_SECOND_LD=""
SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD="ld -n32 -shared -rdata_shared"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="ld -n32 -shared -rdata_shared" SHLIB_SWI_LD="ld -n32 -shared -rdata_shared"
INSTALL_DLLS="" INSTALL_DLLS=""
;; ;;
@ -903,6 +919,7 @@ dnl Linux has both elf and a.out, in this case we found elf
# SHLIB_LD="$CC -bundle -bundle_loader \$(abs_top_builddir)/yap -L\$(abs_top_builddir) -lYap -undefined dynamic_lookup -Wl,-x -dead-strip -dead_strip_dylibs" # SHLIB_LD="$CC -bundle -bundle_loader \$(abs_top_builddir)/yap -L\$(abs_top_builddir) -lYap -undefined dynamic_lookup -Wl,-x -dead-strip -dead_strip_dylibs"
# LDFLAGS="-Wl,-x -dead_strip -dead_strip_dylibs $LDFLAGS" # LDFLAGS="-Wl,-x -dead_strip -dead_strip_dylibs $LDFLAGS"
SHLIB_LD="$CC -bundle -flat_namespace -undefined suppress" SHLIB_LD="$CC -bundle -flat_namespace -undefined suppress"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="$CC -bundle -flat_namespace -undefined suppress" SHLIB_SWI_LD="$CC -bundle -flat_namespace -undefined suppress"
INSTALL_DLLS="" INSTALL_DLLS=""
CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2" CC="$CC -fstrict-aliasing -freorder-blocks -fsched-interblock -Wall -Wstrict-aliasing=2"
@ -920,6 +937,7 @@ dnl Linux has both elf and a.out, in this case we found elf
LDFLAGS="-Wl,--export-dynamic $LDFLAGS" LDFLAGS="-Wl,--export-dynamic $LDFLAGS"
SHLIB_CFLAGS="-fPIC" SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x" SHLIB_LD="ld -Bshareable -x"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="ld -Bshareable -x" SHLIB_SWI_LD="ld -Bshareable -x"
DO_SECOND_LD="" DO_SECOND_LD=""
SHLIB_SUFFIX=".so" SHLIB_SUFFIX=".so"
@ -931,6 +949,7 @@ dnl Linux has both elf and a.out, in this case we found elf
LDFLAGS="-dynamic $LDFLAGS" LDFLAGS="-dynamic $LDFLAGS"
SHLIB_CFLAGS="-fPIC" SHLIB_CFLAGS="-fPIC"
SHLIB_LD="$CC -shared" SHLIB_LD="$CC -shared"
SHLIB_LOWER_LD="$SHLIB_LD"
SHLIB_SWI_LD="$CC -shared" SHLIB_SWI_LD="$CC -shared"
DO_SECOND_LD="" DO_SECOND_LD=""
SHLIB_SUFFIX=".so" SHLIB_SUFFIX=".so"
@ -942,6 +961,7 @@ dnl Linux has both elf and a.out, in this case we found elf
YAPLIB="libWYap.a" YAPLIB="libWYap.a"
SHLIB_CFLAGS="" SHLIB_CFLAGS=""
SHLIB_LD="\$(CC) -shared -Wl,--export-all-symbols ../../yap.dll" SHLIB_LD="\$(CC) -shared -Wl,--export-all-symbols ../../yap.dll"
SHLIB_LOWER_LD="\$(CC) -shared -Wl,--export-all-symbols ../../../yap.dll"
SHLIB_SWI_LD="\$(CC) -shared -Wl,--export-all-symbols ../../yap.dll ../../packages/PLStream/plstream.dll" SHLIB_SWI_LD="\$(CC) -shared -Wl,--export-all-symbols ../../yap.dll ../../packages/PLStream/plstream.dll"
SHLIB_SUFFIX=".dll" SHLIB_SUFFIX=".dll"
C_PARSER_FLAGS="$C_INTERF_FLAGS" C_PARSER_FLAGS="$C_INTERF_FLAGS"
@ -1251,6 +1271,7 @@ AC_SUBST(INSTALL_DLLS)
dnl if we need to merge several .o files into a single dll. dnl if we need to merge several .o files into a single dll.
AC_SUBST(MERGE_DLL_OBJS) AC_SUBST(MERGE_DLL_OBJS)
dnl C-flags used to compile a file that will be loaded dynamically dnl C-flags used to compile a file that will be loaded dynamically
AC_SUBST(CPPFLAGS)
AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_CFLAGS)
dnl suffix for loadable binary (.so,.dll,.o) dnl suffix for loadable binary (.so,.dll,.o)
AC_SUBST(SHLIB_SUFFIX) AC_SUBST(SHLIB_SUFFIX)
@ -1260,6 +1281,7 @@ AC_SUBST(EXEC_SUFFIX)
dnl how to call the loader dnl how to call the loader
AC_SUBST(DO_SECOND_LD) AC_SUBST(DO_SECOND_LD)
AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LOWER_LD)
AC_SUBST(SHLIB_SWI_LD) AC_SUBST(SHLIB_SWI_LD)
AC_SUBST(DYNLIB_LD) AC_SUBST(DYNLIB_LD)
dnl objects in YAP library dnl objects in YAP library

@ -1 +1 @@
Subproject commit c325e4564bb8d4e32c27f2061df85f13d315974e Subproject commit e071f01c1d9015e6d3fabc73092a6e902541485a

@ -1 +1 @@
Subproject commit a2d2f03107eecd45462cd61a678035132cf06326 Subproject commit eb6d27251c2548c25e6d37fff2a27a014caaa7aa

View File

@ -18,7 +18,7 @@ LIBDIR=$(EROOTDIR)/lib/Yap
# #
# #
CC=@CC@ CC=@CC@
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../../.. -I$(srcdir)/../../../include CPPFLAGS= @CPPFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../../.. -I$(srcdir)/../../../include
# #
# #
# You shouldn't need to change what follows. # You shouldn't need to change what follows.
@ -61,10 +61,10 @@ all: $(SOBJS)
# default rule # default rule
%.o : $(srcdir)/%.C %.o : $(srcdir)/%.C
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $< -o $@ $(CC) -c $(CPPFLAGS) $(SHLIB_CFLAGS) $< -o $@
@DO_SECOND_LD@pl-minisat@SHLIB_SUFFIX@: $(OBJS) @DO_SECOND_LD@pl-minisat@SHLIB_SUFFIX@: $(OBJS)
@DO_SECOND_LD@ @SHLIB_LD@ -o pl-minisat@SHLIB_SUFFIX@ $(OBJS) @DO_SECOND_LD@ @SHLIB_LOWER_LD@ -o pl-minisat@SHLIB_SUFFIX@ $(OBJS)
install: all install: all
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(LIBDIR) $(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(LIBDIR)
@ -75,9 +75,9 @@ clean:
depend: $(HEADERS) $(C_SOURCES) depend: $(HEADERS) $(C_SOURCES)
-@if test "$(GCC)" = yes; then\ -@if test "$(GCC)" = yes; then\
$(CC) -MM -MG $(CFLAGS) -I$(srcdir) -I$(srcdir)/../../include -I$(srcdir)/../../H $(C_SOURCES) >> Makefile;\ $(CC) -MM -MG $(CFLAGS) -I$(srcdir) -I$(srcdir)/../../../include -I$(srcdir)/../../../H $(C_SOURCES) >> Makefile;\
else\ else\
makedepend -f - -- $(CFLAGS) -I$(srcdir)/../../H -I$(srcdir)/../../include -- $(C_SOURCES) |\ makedepend -f - -- $(CFLAGS) -I$(srcdir)/../../../H -I$(srcdir)/../../../include -- $(C_SOURCES) |\
sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\ sed 's|.*/\([^:]*\):|\1:|' >> Makefile ;\
fi fi