aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-08-26 05:06:31 +0000
committerdos-reis <gdr@axiomatics.org>2010-08-26 05:06:31 +0000
commit95feb5d4024c0d440a6891cfad6606dcb78f8b21 (patch)
tree10b3e007e1b8df0506a861d42a3feb8d9df10202
parent5a9b61c826838b7f97db1ad3b3c350482d407377 (diff)
downloadopen-axiom-95feb5d4024c0d440a6891cfad6606dcb78f8b21.tar.gz
* config/open-axiom.m4 (OPENAXIOM_BUILD_TOOLS): Check for ln -s
and sed. * config/var-def.mk (oa_target_includedir): New.
-rw-r--r--ChangeLog6
-rw-r--r--config/open-axiom.m42
-rw-r--r--config/var-def.mk1
-rwxr-xr-xconfigure82
-rw-r--r--src/ChangeLog6
-rw-r--r--src/utils/Makefile.in36
-rw-r--r--src/utils/hammer.cc2
-rw-r--r--src/utils/hash-table.H2
-rw-r--r--src/utils/sexpr.H2
-rw-r--r--src/utils/sexpr.cc2
-rw-r--r--src/utils/storage.H2
-rw-r--r--src/utils/storage.cc4
-rw-r--r--src/utils/string-pool.H2
-rw-r--r--src/utils/string-pool.cc2
14 files changed, 136 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ec27773..3750f454 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * config/open-axiom.m4 (OPENAXIOM_BUILD_TOOLS): Check for ln -s
+ and sed.
+ * config/var-def.mk (oa_target_includedir): New.
+
2010-08-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
* config/open-axiom.m4 (OPENAXIOM_ALIGNMENT_OPERATOR): New. Check
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index d7de600a..fac0f7d0 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -554,6 +554,8 @@ AC_DEFUN([OPENAXIOM_BUILD_TOOLS],[
AC_CHECK_PROG([TOUCH], [touch],
[touch], [AC_MSG_ERROR(['touch' program is missing.])])
AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_SED
AC_CHECK_PROGS([MKTEMP], [mktemp])
AC_PROG_AWK
diff --git a/config/var-def.mk b/config/var-def.mk
index a086ae71..b17f82ec 100644
--- a/config/var-def.mk
+++ b/config/var-def.mk
@@ -194,6 +194,7 @@ axiom_target_srcdir = $(axiom_targetdir)/src
axiom_target_docdir = $(axiom_targetdir)/doc
axiom_target_datadir = $(axiom_targetdir)/share
axiom_target_texdir = $(axiom_target_datadir)/texmf/tex
+oa_target_includedir = $(axiom_targetdir)/include
## Where OpenAxiom keeps the tarballs for optional components
diff --git a/configure b/configure
index d12ab19f..2a641afe 100755
--- a/configure
+++ b/configure
@@ -17174,6 +17174,88 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ $as_unset ac_script || ac_script=
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ 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_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
for ac_prog in mktemp
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
diff --git a/src/ChangeLog b/src/ChangeLog
index f1563733..03f24094 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * utils/Makefile.in: Install headers.
+
+2010-08-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
2010-08-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/i-output.boot (newlineIfDisplaying): New.
diff --git a/src/utils/Makefile.in b/src/utils/Makefile.in
index b3adb6b9..4f43e115 100644
--- a/src/utils/Makefile.in
+++ b/src/utils/Makefile.in
@@ -40,9 +40,18 @@ libOpenAxiom_HEADERS = storage.H hash-table.H string-pool.H sexpr.H
libOpenAxiom_SOURCES = storage.cc string-pool.cc sexpr.cc
libOpenAxiom_OBJECTS = $(libOpenAxiom_SOURCES:.cc=.lo)
+oa_public_headers = storage hash-table string-pool sexpr
+
+## Where we store public header files
+oa_target_headerdir = $(oa_target_includedir)/open-axiom
+
+oa_include_flags = -I. -I$(oa_target_includedir) -I$(top_builddir)/config
+
.PHONY: all all-ax all-utils
.SUFFIXES:
-.SUFFIXES: .cc .H $(OBJEXT) $(LIBEXT)
+.SUFFIXES: .cc .H .$(OBJEXT) .$(LIBEXT)
+.PRECIOUS: %.lo %.$(OBJEXT)
+
all: all-ax
@@ -52,9 +61,23 @@ stamp: libOpenAxiom.$(LIBEXT) hammer$(EXEEXT)
-rm -f stamp
$(STAMP) stamp
-.SUFFIXES:
-.SUFFIXES: .c .h .lo .$(OBJEXT)
-.PRECIOUS: %.lo %.obj
+stamp-headers: $(libOpenAxiom_HEADERS) Makefile
+ rm -f stamp-headers
+ if [ ! -d $(oa_target_headerdir) ]; then \
+ mkdir -p -- $(oa_target_headerdir) || exit 1; \
+ fi ; \
+ c1=$(top_builddir)/config/openaxiom-c-macros.h; \
+ c2=$(oa_target_headerdir)/config; \
+ if [ ! -r $$c2 ] || ! cmp -s $$c1 $$c2 ; then \
+ cp -p $$c1 $$c2; \
+ fi ; \
+ for h in $(oa_public_headers); do \
+ f1=$(srcdir)/$$h.H; f2=$(oa_target_headerdir)/$$h; \
+ if [ ! -r $$f2 ] || ! cmp -s $$f1 $$f2 ; then \
+ cp -p $$f1 $$f2; \
+ fi; \
+ done ; \
+ $(STAMP) stamp-headers
hammer$(EXEEXT): $(hammer_OBJECTS) libOpenAxiom.$(LIBEXT)
$(CXXLINK) -o $@ $(hammer_OBJECTS) $(hammer_LDADD) $(LDFLAGS)
@@ -62,12 +85,13 @@ hammer$(EXEEXT): $(hammer_OBJECTS) libOpenAxiom.$(LIBEXT)
libOpenAxiom.$(LIBEXT): $(libOpenAxiom_OBJECTS)
$(CXXLINK) -o $@ $(libOpenAxiom_OBJECTS)
-%.lo: %.cc $(libOpenAxiom_HEADERS)
- $(CXXCOMPILE) ${CXXFLAGS} -I. -I$(top_builddir)/config -o $@ $<
+%.lo: %.cc stamp-headers
+ $(CXXCOMPILE) ${CXXFLAGS} $(oa_include_flags) -o $@ $<
mostlyclean-local:
@rm -rf .libs
+ @rm -rf $(oa_include_headerdir) stamp-headers
@rm -f $(libOpenAxiom_OBJECTS)
@rm -f *~ core
diff --git a/src/utils/hammer.cc b/src/utils/hammer.cc
index 35ef5c1f..3ab56c72 100644
--- a/src/utils/hammer.cc
+++ b/src/utils/hammer.cc
@@ -48,7 +48,7 @@
#include <list>
#include <vector>
#include <map>
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
namespace Hammer {
diff --git a/src/utils/hash-table.H b/src/utils/hash-table.H
index 75b485ff..f5a2c7d0 100644
--- a/src/utils/hash-table.H
+++ b/src/utils/hash-table.H
@@ -37,7 +37,7 @@
// --% Simple hash table facility. To be replaced by C++0x
// --% hash tables when C++0x compilers become common place.
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
// --------------------
diff --git a/src/utils/sexpr.H b/src/utils/sexpr.H
index 5139b453..3059dce5 100644
--- a/src/utils/sexpr.H
+++ b/src/utils/sexpr.H
@@ -44,7 +44,7 @@
#include <iosfwd>
#include <vector>
#include <set>
-#include "string-pool.H"
+#include <open-axiom/string-pool>
// Helpers for defining token type values for lexeme with more
// than characters.
diff --git a/src/utils/sexpr.cc b/src/utils/sexpr.cc
index d9d38220..248c0649 100644
--- a/src/utils/sexpr.cc
+++ b/src/utils/sexpr.cc
@@ -34,7 +34,7 @@
#include <ctype.h>
#include <iostream>
#include <iterator>
-#include "sexpr.H"
+#include <open-axiom/sexpr>
namespace OpenAxiom {
namespace Sexpr {
diff --git a/src/utils/storage.H b/src/utils/storage.H
index 60d5c0b4..03b03604 100644
--- a/src/utils/storage.H
+++ b/src/utils/storage.H
@@ -43,7 +43,7 @@
#include <cmath>
#include <string>
-#include "openaxiom-c-macros.h"
+#include <open-axiom/config>
namespace OpenAxiom {
// -----------------
diff --git a/src/utils/storage.cc b/src/utils/storage.cc
index 4883de6c..a023e945 100644
--- a/src/utils/storage.cc
+++ b/src/utils/storage.cc
@@ -31,7 +31,7 @@
// --%: Gabriel Dos Reis.
-#include "openaxiom-c-macros.h"
+#include <open-axiom/config>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -56,7 +56,7 @@
#include <stdlib.h>
#include <string.h>
#include <new> // for placement new.
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
// ----------------
diff --git a/src/utils/string-pool.H b/src/utils/string-pool.H
index f3692a79..ae90409b 100644
--- a/src/utils/string-pool.H
+++ b/src/utils/string-pool.H
@@ -33,7 +33,7 @@
#define OPENAXIOM_STRING_POOL_INCLUDED
#include <string.h>
-#include "hash-table.H"
+#include <open-axiom/hash-table>
// --% Author: Gabriel Dos Reis.
// --% Description:
diff --git a/src/utils/string-pool.cc b/src/utils/string-pool.cc
index 5ae6b15d..0c529ace 100644
--- a/src/utils/string-pool.cc
+++ b/src/utils/string-pool.cc
@@ -31,7 +31,7 @@
// --% Author: Gabriel Dos Reis
-#include "string-pool.H"
+#include <open-axiom/string-pool>
namespace OpenAxiom {
// ----------------