This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
cross-compile: patch for configure.in
- To: guile at sourceware dot cygnus dot com
- Subject: cross-compile: patch for configure.in
- From: Jan Nieuwenhuizen <janneke at gnu dot org>
- Date: Thu, 23 Mar 2000 12:44:31 +0100
Hi,
Here's a simple fix that I had to make to enables cross-configuration. It
allows you to set:
--enable-sizeof-int
--enable-sizeof-long
--enable-restartable-syscalls
Greetings,
Jan.
diff -urN ../guile-core/ChangeLog ./ChangeLog
--- ../guile-core/ChangeLog Thu Mar 23 12:32:21 2000
+++ ./ChangeLog Thu Mar 23 12:38:58 2000
@@ -1,3 +1,9 @@
+2000-03-23 <janneke@gnu.org>
+
+ * configure.in: added options to enable cross-compilation:
+ --enable-sizeof-int, --enable-sizeof-long,
+ --enable-restartable-syscalls.
+
2000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* devel: New directory. Intended to carry documentation related
diff -urN ../guile-core/configure.in ./configure.in
--- ../guile-core/configure.in Thu Mar 23 12:32:21 2000
+++ ./configure.in Thu Mar 23 12:34:03 2000
@@ -68,6 +68,21 @@
[ --disable-regex omit regular expression interfaces],,
enable_regex=yes)
+sizeof_int=0
+AC_ARG_ENABLE(sizeof-int,
+ [ --enable-sizeof-int Set size of int (for cross compilation)],
+ [sizeof_int=$enableval])
+
+sizeof_long=0
+AC_ARG_ENABLE(sizeof-long,
+ [ --enable-sizeof-long Set size of long (for cross compilation)],
+ [sizeof_long=$enableval])
+
+restartable_syscalls=test
+AC_ARG_ENABLE(restartable-syscalls,
+ [ --enable-restartable syscalls Are interrupted syscalls restarted (for cross compilation)],
+ [restartable_syscalls=$enableval])
+
dnl The --disable-debug used to control these two. But now they are
dnl a required part of the distribution.
AC_DEFINE(DEBUG_EXTENSIONS)
@@ -108,8 +123,8 @@
AC_C_CONST
AC_C_INLINE
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(int, $sizeof_int)
+AC_CHECK_SIZEOF(long, $sizeof_long)
AC_CACHE_CHECK([for long longs], scm_cv_long_longs,
AC_TRY_COMPILE(,
[long long a],
@@ -299,7 +314,15 @@
dnl behaviour for some reason: e.g., different versions of linux seem
dnl to behave differently.)
-AC_SYS_RESTARTABLE_SYSCALLS
+if test "$restartable_syscalls" = yes ||
+ test "$restartable_syscalls" = y; then
+ AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
+elif test "$restartable_syscalls" = no ||
+ test "$restartable_syscalls" = n; then
+ ;
+else
+ AC_SYS_RESTARTABLE_SYSCALLS
+fi
if test "$enable_regex" = yes; then
if test "$ac_cv_header_regex_h" = yes ||
@@ -362,7 +385,7 @@
AC_TRY_RUN(aux (l) unsigned long l;
{ int x; exit (l >= ((unsigned long)&x)); }
main () { int q; aux((unsigned long)&q); },
- AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
+ AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in), AC_DEFINE(SCM_STACK_GROWS_DOWN))
AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
[AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org