From 09b739034463bcaf2d46f1f29f9e31cd1014dac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 20 Jan 2010 01:37:45 +0000 Subject: [PATCH] [CONFIGURATION] * BUG: Do not use the "echo" command with options, FreeBSD shell does not understand it. * BUG: Make the "main" directory compile on Mac OS X. git-svn-id: svn://localhost/gambas/trunk@2619 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- acinclude.m4 | 16 ++++++++-------- configure.ac | 2 +- main/gbx/Makefile.am | 4 ++-- main/gbx/gb_error.c | 2 +- main/share/gb_common.h | 11 ++++++++--- main/share/gb_component.h | 4 +++- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 393163576..4084c011b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -91,7 +91,7 @@ AC_DEFUN([GB_LIBTOOL], AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) - LD_FLAGS="-Wl,-O1" + dnl LD_FLAGS="-Wl,-O1" AC_SUBST(LD_FLAGS) ]) @@ -141,8 +141,8 @@ AC_DEFUN([GB_INIT], dnl ---- Checks for libraries - AC_CHECK_LIB(m, main, echo -n) - AC_CHECK_LIB(z, main, echo -n) + dnl AC_CHECK_LIB(m, main, echo) + dnl AC_CHECK_LIB(z, main, echo) C_LIB=-lc @@ -234,7 +234,7 @@ AC_DEFUN([GB_INIT], AM_CONDITIONAL(OPTIMIZE, test "$gambas_optimization" = yes) - AM_CFLAGS="$AM_CFLAGS -pipe -Wall -Wno-unused-value -fsigned-char" + AM_CFLAGS="$AM_CFLAGS -pipe -Wall -Wno-unused-value -fsigned-char -fnested-functions" AM_CXXFLAGS="$AM_CXXFLAGS -pipe -Wall -fno-exceptions -Wno-unused-value -fsigned-char" dnl ---- Check for gcc visibility flag @@ -289,7 +289,7 @@ AC_DEFUN([GB_INIT], AC_DEFUN([GB_THREAD], [ case "${host}" in - *-*-freebsd* ) + *-*-freebsd* | *-*-darwin* ) THREAD_LIB="" THREAD_INC="-pthread -D_REENTRANT" GBX_THREAD_LIB="" @@ -396,15 +396,15 @@ AC_DEFUN([GB_SYSTEM], AC_MSG_CHECKING(target architecture) case "${host}" in - i*86-*-*-* ) + i*86-*-* ) ARCH=X86 AC_DEFINE(ARCH_X86, 1, [Target architecture is x86]) ;; - x86_64-*-*-* ) + x86_64-*-* ) ARCH=X86_64 AC_DEFINE(ARCH_X86_64, 1, [Target architecture is x86_64]) ;; - arm*-*-*-* ) + arm*-*-* ) ARCH=ARM AC_DEFINE(ARCH_ARM, 1, [Target architecture is ARM]) ;; diff --git a/configure.ac b/configure.ac index 263b51fa3..97f70f28c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ if test x"$GB_SUMMARY" = x; then echo "ALL COMPONENTS WILL BE COMPILED" else echo "THESE COMPONENTS ARE DISABLED:" - echo -e $GB_SUMMARY + echo $GB_SUMMARY fi echo echo "************************************************************" diff --git a/main/gbx/Makefile.am b/main/gbx/Makefile.am index 8efa43d09..6f2d796aa 100644 --- a/main/gbx/Makefile.am +++ b/main/gbx/Makefile.am @@ -8,11 +8,11 @@ gblib_LTLIBRARIES = gb.la libgbx_a_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS_OPT) gbx3_LDADD = libgbx.a @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD_LIB@ @FFI_LIB@ -gbx3_LDFLAGS = @LD_FLAGS@ @FFI_LDFLAGS@ +gbx3_LDFLAGS = @LD_FLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@ gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS) gb_la_LIBADD = @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD_LIB@ @FFI_LIB@ -gb_la_LDFLAGS = -module @LD_FLAGS@ @FFI_LDFLAGS@ +gb_la_LDFLAGS = -module @LD_FLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@ gb_la_CFLAGS = -DGBX_INFO $(AM_CFLAGS) -O0 libgbx_a_SOURCES = \ diff --git a/main/gbx/gb_error.c b/main/gbx/gb_error.c index c850e8dc2..868656ca7 100644 --- a/main/gbx/gb_error.c +++ b/main/gbx/gb_error.c @@ -27,10 +27,10 @@ #include #include "gb_buffer.h" -#include "gb_error.h" #include "gbx_debug.h" #include "gbx_exec.h" #include "gbx_api.h" +#include "gb_error.h" //#define DEBUG_ERROR 1 diff --git a/main/share/gb_common.h b/main/share/gb_common.h index 18b700108..1667d2d00 100644 --- a/main/share/gb_common.h +++ b/main/share/gb_common.h @@ -64,8 +64,6 @@ typedef void (*sighandler_t) (int); #include /* sighandler_t is replaced by sig_t */ #define sighandler_t sig_t - /* modfl is not yet implemented */ - # define modfl(a,b) modf(a,b) typedef unsigned long ulong; @@ -103,6 +101,13 @@ typedef void (*sighandler_t) (int); #endif +#ifdef OS_MACOSX + +#include +#undef bool + +#endif + #if !defined(__cplusplus) #ifndef FALSE @@ -161,7 +166,7 @@ typedef # define BREAKPOINT() { raise (SIGTRAP); } #endif /* __i386__ */ -#define COPYRIGHT "(c) 2000-2008 Benoit Minisini\n\n" \ +#define COPYRIGHT "(c) 2000-2010 Benoit Minisini\n\n" \ "This program is free software; you can redistribute it and/or \n" \ "modify it under the terms of the GNU General Public License as \n" \ "published by the Free Software Foundation; either version 2, or \n" \ diff --git a/main/share/gb_component.h b/main/share/gb_component.h index e6d878712..ada7931f4 100644 --- a/main/share/gb_component.h +++ b/main/share/gb_component.h @@ -43,7 +43,9 @@ typedef //#define LIB_GAMBAS_PTR "GB_PTR" #ifdef DONT_USE_LTDL - #ifdef OS_OPENBSD + #ifdef OS_MACOSX + #define LIB_PATTERN "%s/%s.so" + #elif OS_OPENBSD #define LIB_PATTERN "%s/%s." SHARED_LIBRARY_EXT ".0.0" #else #define LIB_PATTERN "%s/%s." SHARED_LIBRARY_EXT