]> thyrsus.com Git - intercal.git/commitdiff
Fixes for customized non-cross compilations
authorAlex Smith <ais523@bham.ac.uk>
Sat, 11 Oct 2008 19:23:49 +0000 (15:23 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:14 +0000 (20:35 -0400)
MANIFEST
buildaux/Makefile.am
buildaux/Makefile.in
configure
configure.ac

index 9677ce06d7b752d391b9533489533c3189ec610d..f5002369d489f5635ba15491ba6ee24551a4d3c1 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -39,6 +39,7 @@
 ./etc/IFFI.spec
 ./etc/intercal.el
 ./etc/temp
+./MANIFEST
 ./NEWS
 ./pit
 ./pit/beer.doc
index 72d144ed83ffe5ff6a05f38dc860d800ba685e38..ff370cbe60d6d7a3c9e743fe72a1dc508aa5f27b 100644 (file)
@@ -100,6 +100,7 @@ dist-hook:
        mv $(distdir)/parser.h $(distdir)/prebuilt
        mv $(distdir)/lexer.c $(distdir)/prebuilt
        mv $(distdir)/oil-oil.c $(distdir)/prebuilt
+       touch $(distdir)/MANIFEST
        (cd $(distdir); find . | sort > MANIFEST)
 
 # Update the prebuilt directory in the original source from the built
index 0d0668f74af3d301e0e7c70b9c35c65afd5c1735..97bcc5990b5d122f08ff3440ce005466a193cecb 100644 (file)
@@ -39,7 +39,8 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(dist_ickdata_DATA) \
        $(dist_man1_MANS) $(ickinclude_HEADERS) \
        $(top_srcdir)/buildaux/Makefile.am \
-       $(top_srcdir)/buildaux/Makefile.in $(top_srcdir)/configure \
+       $(top_srcdir)/buildaux/Makefile.in \
+       $(top_srcdir)/buildaux/hostmak.in $(top_srcdir)/configure \
        $(top_srcdir)/src/configh.in $(top_srcdir)/src/cooptsh.in \
        COPYING NEWS oil-oil.c
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -50,7 +51,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = coopt.sh
+CONFIG_CLEAN_FILES = coopt.sh host.mak
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -63,7 +64,6 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(ickincludedir)"
 libLIBRARIES_INSTALL = $(INSTALL_DATA)
 LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES)
-AR = ar
 ARFLAGS = cru
 libick_a_AR = $(AR) $(ARFLAGS)
 libick_a_DEPENDENCIES = atari.o baudot.o ebcdic.o latin1.o
@@ -164,6 +164,7 @@ distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -384,6 +385,8 @@ distclean-hdr:
        -rm -f config.h stamp-h1
 coopt.sh: $(top_builddir)/config.status $(top_srcdir)/src/cooptsh.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
+host.mak: $(top_builddir)/config.status $(top_srcdir)/buildaux/hostmak.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLIBRARIES: $(lib_LIBRARIES)
        @$(NORMAL_INSTALL)
        test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@@ -1408,6 +1411,7 @@ dist-hook:
        mv $(distdir)/parser.h $(distdir)/prebuilt
        mv $(distdir)/lexer.c $(distdir)/prebuilt
        mv $(distdir)/oil-oil.c $(distdir)/prebuilt
+       touch $(distdir)/MANIFEST
        (cd $(distdir); find . | sort > MANIFEST)
 
 # Update the prebuilt directory in the original source from the built
index 2c705e4dea3292f3c2830c3b0ffdc2f2290f8148..ee903d96d05ad65db9235a5dee8843b2a3fbcfba 100755 (executable)
--- a/configure
+++ b/configure
@@ -697,6 +697,7 @@ LEX_OUTPUT_ROOT
 LEXLIB
 RANLIB
 LN_S
+AR
 CPP
 GREP
 EGREP
@@ -3757,6 +3758,103 @@ else
 echo "${ECHO_T}no, using $LN_S" >&6; }
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+
 
 
 ac_ext=c
@@ -6289,7 +6387,7 @@ INCLUDE_HIDDEN_FROM_AUTOMAKE="include"
 
 
 
-ac_config_files="$ac_config_files Makefile:buildaux/Makefile.in coopt.sh:src/cooptsh.in"
+ac_config_files="$ac_config_files Makefile:buildaux/Makefile.in coopt.sh:src/cooptsh.in host.mak:buildaux/hostmak.in"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6872,6 +6970,7 @@ do
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:buildaux/Makefile.in" ;;
     "coopt.sh") CONFIG_FILES="$CONFIG_FILES coopt.sh:src/cooptsh.in" ;;
+    "host.mak") CONFIG_FILES="$CONFIG_FILES host.mak:buildaux/hostmak.in" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -7016,6 +7115,7 @@ LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim
 LEXLIB!$LEXLIB$ac_delim
 RANLIB!$RANLIB$ac_delim
 LN_S!$LN_S$ac_delim
+AR!$AR$ac_delim
 CPP!$CPP$ac_delim
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
@@ -7025,7 +7125,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -7647,9 +7747,13 @@ echo "$as_me: WARNING: No version of yacc was found; using prebuilt parser." >&2
 echo "$as_me: WARNING: Changes to src/parser.y and src/oil.y will be ingored." >&2;}
 fi
 
-# Configure again, for the build system.
+# Configure again, for the build system, if necessary.
 # It's simpler the second time round as we don't care about things like
 # installation dirs, just about how to do things like run the compiler.
+if test "$cross_compiling" != yes; then
+  cp config.h bconfig.h
+  exit 0
+fi
 
 cd $ac_pwd;
 
index 529ac9297bf8982d23ce13147a0385544fb83743..dec0117da0bfe84f4fc4b6470ed3b1dd17c35294 100644 (file)
@@ -19,6 +19,8 @@ AC_PROG_CC
 AM_PROG_LEX
 AC_PROG_RANLIB
 AC_PROG_LN_S
+AC_CHECK_TOOL([AR],[ar])
+AC_SUBST(AR)
 
 dnl Checks for libraries.
 
@@ -73,7 +75,7 @@ INCLUDE_HIDDEN_FROM_AUTOMAKE="include"
 AC_SUBST(PACKAGE_VERSION)
 AC_SUBST(INCLUDE_HIDDEN_FROM_AUTOMAKE)
 
-AC_CONFIG_FILES([Makefile:buildaux/Makefile.in coopt.sh:src/cooptsh.in])
+AC_CONFIG_FILES([Makefile:buildaux/Makefile.in coopt.sh:src/cooptsh.in host.mak:buildaux/hostmak.in])
 AC_OUTPUT
 # After the output, chmod coopt.sh to be executable.
 chmod a+x coopt.sh
@@ -94,9 +96,13 @@ if test ! -n "$YACC"; then
   AC_MSG_WARN([Changes to src/parser.y and src/oil.y will be ingored.])
 fi
 
-# Configure again, for the build system.
+# Configure again, for the build system, if necessary.
 # It's simpler the second time round as we don't care about things like
 # installation dirs, just about how to do things like run the compiler.
+if test "$cross_compiling" != yes; then
+  cp config.h bconfig.h
+  exit 0
+fi
 
 cd $ac_pwd;