Enlightenment CVS committal Author : raster Project : e17 Module : libs/edb
Dir : e17/libs/edb Modified Files: configure.in Added Files: make_cross_compile_arm.sh Log Message: make edb cross-compile =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/edb/configure.in,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- configure.in 13 May 2004 03:38:18 -0000 1.24 +++ configure.in 13 May 2004 05:54:27 -0000 1.25 @@ -211,16 +211,6 @@ AC_DEFINE(HAVE_SIGFILLSET, 1, [sigfillset() available]) fi -dnl Some versions of sprintf return a pointer to the first argument instead -dnl of a character count. We assume that the return value of snprintf and -dnl vsprintf etc. will be the same as sprintf, and check the easy one. -AC_CACHE_CHECK([for int type sprintf return value], db_cv_sprintf_count, [dnl -AC_TRY_RUN([main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}], - [db_cv_sprintf_count=yes], [db_cv_sprintf_count=no])]) -if test "$db_cv_sprintf_count" = no; then - AC_DEFINE(SPRINTF_RET_CHARPNT, 1, [sprintf() returns char pointer]) -fi - dnl Vendors are doing 64-bit lseek in different ways. dnl AIX, HP/UX and Solaris all use _FILE_OFFSET_BITS to specify a "big-file" dnl environment. @@ -237,148 +227,6 @@ AC_MSG_RESULT("yes") fi -dnl Figure out if we have spinlocks for the compiler/architecture. -AC_CACHE_CHECK([for spinlocks], db_cv_spinlocks, [dnl -db_cv_spinlocks=no - -dnl msemaphore: HPPA -dnl Try HPPA before general msem test, it needs special mutex alignment. -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(__hppa) -#include <sys/mman.h> -typedef msemaphore tsl_t; -msemaphore x; msem_init(&x, 0); msem_lock(&x, 0); msem_unlock(&x, 0); -exit(0); -#else -exit(1); -#endif -}], [db_cv_spinlocks=msem-hppa/func]) -fi - -dnl msemaphore: OSF/1 -if test "$db_cv_spinlocks" = no; then -AC_TRY_LINK([#include <sys/types.h>], -[#include <sys/mman.h>; - typedef msemaphore tsl_t; -msemaphore x; msem_init(&x, 0); msem_lock(&x, 0); msem_unlock(&x, 0);], -[db_cv_spinlocks=msem/func]) -fi - -dnl ReliantUNIX -if test "$db_cv_spinlocks" = no; then -saved_libs="$LIBS" -LIBS="$LIBS -lmproc" -AC_TRY_LINK([#include <ulocks.h>], -[typedef spinlock_t tsl_t; - spinlock_t x; initspin(&x, 1); cspinlock(&x); spinunlock(&x);], -[db_cv_spinlocks=reliant/func],[LIBS="$saved_libs"]) -fi - -dnl SCO: UnixWare has threads in libthread, but OpenServer doesn't. -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(__USLC__) -exit(0); -#endif -exit(1);}], [db_cv_spinlocks=sco/cc]) -fi - -dnl abilock_t: SGI -if test "$db_cv_spinlocks" = no; then -AC_TRY_LINK([#include <abi_mutex.h>], -[typedef abilock_t tsl_t; - abilock_t x; init_lock(&x); acquire_lock(&x); release_lock(&x);], -[db_cv_spinlocks=sgi/func]) -fi - -dnl sema_t: Solaris -dnl The semaphore calls do not work on Solaris 5.5. -if test "$db_cv_spinlocks" = NOTYET; then -AC_TRY_LINK([#include <synch.h>], -[typedef sema_t tsl_t; - sema_t x; - sema_init(&x, 1, USYNC_PROCESS, NULL); sema_wait(&x); sema_post(&x);], -[db_cv_spinlocks=solaris/func]) -fi - -dnl _lock_try/_lock_clear: Solaris -if test "$db_cv_spinlocks" = no; then -AC_TRY_LINK([#include <sys/machlock.h>], -[typedef lock_t tsl_t; - lock_t x; - _lock_try(&x); _lock_clear(&x);], -[db_cv_spinlocks=solaris/func]) -fi - -dnl _check_lock/_clear_lock: AIX -if test "$db_cv_spinlocks" = no; then -AC_TRY_LINK([#include <sys/atomic_op.h>], -[int x; _check_lock(x,0,1); _clear_lock(x,0);], -[db_cv_spinlocks=aix/func]) -fi - -dnl PaRisc/gcc: HP/UX -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(__hppa) -#if defined(__GNUC__) -exit(0); -#endif -#endif -exit(1);}], [db_cv_spinlocks=parisc/gcc]) -fi - -dnl Sparc/gcc: Solaris -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(__sparc__) -#if defined(__GNUC__) -exit(0); -#endif -#endif -exit(1);}], [db_cv_spinlocks=sparc/gcc]) -fi - -dnl 68K/gcc: SunOS -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if (defined(mc68020) || defined(sun3)) -#if defined(__GNUC__) -exit(0); -#endif -#endif -exit(1);}], [db_cv_spinlocks=mc68020/gcc]) -fi - -dnl x86/gcc: BSD/OS, FreeBSD, NetBSD, Linux -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(i386) -#if defined(__GNUC__) -exit(0); -#endif -#endif -exit(1);}], [db_cv_spinlocks=x86/gcc]) -fi - -dnl: uts/cc: UTS -if test "$db_cv_spinlocks" = no; then -AC_TRY_RUN([main(){ -#if defined(_UTS) -exit(0); -#endif -exit(1);}], [db_cv_spinlocks=uts4/cc]) -fi - -]) - -if test "$db_cv_spinlocks" = no; then - AC_MSG_WARN([SPINLOCKS NOT IMPLEMENTED FOR THIS COMPILER/ARCHITECTURE.]) -else - AC_DEFINE(HAVE_SPINLOCKS, 1, [Spinlocks available]) -fi - dnl Some architectures require DB to be compiled with special flags and/or dnl libraries for threaded applications case "$host_os" in @@ -393,72 +241,8 @@ AC_SUBST(spin_line1) AC_SUBST(spin_line2) AC_SUBST(spin_line3) +mutex_align=1; AC_SUBST(mutex_align) -case "$db_cv_spinlocks" in -aix/func) - AC_DEFINE(HAVE_FUNC_AIX, 1, [AIX/function spinlock support]) - mutex_align="sizeof(int)" - spin_line1="#include <sys/atomic_op.h>" - spin_line2="typedef int tsl_t;";; -mc68020/gcc) - AC_DEFINE(HAVE_ASSEM_MC68020_GCC, 1, [m68k/GCC spinlock support]) - mutex_align="1" - spin_line1="typedef unsigned char tsl_t;";; -msem-hppa/func) - AC_DEFINE(HAVE_FUNC_MSEM, 1, [msem/function spinlock support]) - mutex_align="16" - spin_line1="#include <sys/mman.h>" - spin_line2="typedef msemaphore tsl_t;";; -msem/func) - AC_DEFINE(HAVE_FUNC_MSEM, 1, [msem/function spinlock support]) - mutex_align="sizeof(int)" - spin_line1="#include <sys/mman.h>" - spin_line2="typedef msemaphore tsl_t;";; -parisc/gcc) - AC_DEFINE(HAVE_ASSEM_PARISC_GCC, 1, [PARISC/GCC spinlock support]) - mutex_align="16" - spin_line1="typedef u_int32_t tsl_t;";; -reliant/func) - AC_DEFINE(HAVE_FUNC_RELIANT, 1, [Reliant/function spinlock support]) - mutex_align="1" - spin_line1="#include <ulocks.h>" - spin_line2="typedef spinlock_t tsl_t;";; -sgi/func) - AC_DEFINE(HAVE_FUNC_SGI, 1, [SGI/function spinlock support]) - mutex_align="sizeof(int)" - spin_line1="#include <abi_mutex.h>" - spin_line2="typedef abilock_t tsl_t;";; -NOTYET_solaris/func) - AC_DEFINE(HAVE_FUNC_SOLARIS, 1, [Solaris/function spinlock support]) - mutex_align="sizeof(int)" - spin_line1="#include <synch.h>" - spin_line2="typedef sema_t tsl_t;";; -sco/cc) - AC_DEFINE(HAVE_ASSEM_SCO_CC, 1, [SCO/cc Unix spinlock support]) - mutex_align="1" - spin_line1="typedef unsigned char tsl_t;";; -solaris/func) - AC_DEFINE(HAVE_FUNC_SOLARIS, 1, [Solaris/function spinlock support]) - mutex_align="sizeof(int)" - spin_line1="#include <sys/machlock.h>" - spin_line2="typedef lock_t tsl_t;";; -sparc/gcc) - AC_DEFINE(HAVE_ASSEM_SPARC_GCC, 1, [Sparc/GCC spinlock support]) - mutex_align="1" - spin_line1="typedef unsigned char tsl_t;";; -uts4/cc) - AC_DEFINE(HAVE_ASSEM_UTS4_CC, 1, [UTS4/cc spinlock support]) - mutex_align="sizeof(int)" - spin_line1="typedef int tsl_t;" -dnl AC_LIBOBJ="$AC_LIBOBJ uts4.cc.o" - ;; -x86/gcc) - AC_DEFINE(HAVE_ASSEM_X86_GCC, 1, [x86/GCC spinlock support]) - mutex_align="1" - spin_line1="typedef unsigned char tsl_t;";; -*) - mutex_align="1";; -esac dnl Check for the standard shorthand types. AC_SUBST(u_char_decl) @@ -497,9 +281,7 @@ AC_SUBST(u_int8_decl) AC_CACHE_CHECK([for u_int8_t], db_cv_uint8, [dnl AC_TRY_COMPILE([#include <sys/types.h>], u_int8_t foo;, - [db_cv_uint8=yes], - AC_TRY_RUN([main(){exit(sizeof(unsigned char) != 1);}], - [db_cv_uint8="unsigned char"], [db_cv_uint8=no]))]) + [db_cv_uint8=yes])]) if test "$db_cv_uint8" = no; then AC_MSG_ERROR(No unsigned 8-bit integral type.) fi @@ -510,11 +292,7 @@ AC_SUBST(u_int16_decl) AC_CACHE_CHECK([for u_int16_t], db_cv_uint16, [dnl AC_TRY_COMPILE([#include <sys/types.h>], u_int16_t foo;, - [db_cv_uint16=yes], -AC_TRY_RUN([main(){exit(sizeof(unsigned short) != 2);}], - [db_cv_uint16="unsigned short"], -AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 2);}], - [db_cv_uint16="unsigned int"], [db_cv_uint16=no])))]) + [db_cv_uint16=yes])]) if test "$db_cv_uint16" = no; then AC_MSG_ERROR([No unsigned 16-bit integral type.]) fi @@ -525,11 +303,7 @@ AC_SUBST(int16_decl) AC_CACHE_CHECK([for int16_t], db_cv_int16, [dnl AC_TRY_COMPILE([#include <sys/types.h>], int16_t foo;, - [db_cv_int16=yes], -AC_TRY_RUN([main(){exit(sizeof(short) != 2);}], - [db_cv_int16="short"], -AC_TRY_RUN([main(){exit(sizeof(int) != 2);}], - [db_cv_int16="int"], [db_cv_int16=no])))]) + [db_cv_int16=yes])]) if test "$db_cv_int16" = no; then AC_MSG_ERROR([No signed 16-bit integral type.]) fi @@ -540,11 +314,7 @@ AC_SUBST(u_int32_decl) AC_CACHE_CHECK([for u_int32_t], db_cv_uint32, [dnl AC_TRY_COMPILE([#include <sys/types.h>], u_int32_t foo;, - [db_cv_uint32=yes], -AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 4);}], - [db_cv_uint32="unsigned int"], -AC_TRY_RUN([main(){exit(sizeof(unsigned long) != 4);}], - [db_cv_uint32="unsigned long"], [db_cv_uint32=no])))]) + [db_cv_uint32=yes])]) if test "$db_cv_uint32" = no; then AC_MSG_ERROR([No unsigned 32-bit integral type.]) fi @@ -555,11 +325,7 @@ AC_SUBST(int32_decl) AC_CACHE_CHECK([for int32_t], db_cv_int32, [dnl AC_TRY_COMPILE([#include <sys/types.h>], int32_t foo;, - [db_cv_int32=yes], -AC_TRY_RUN([main(){exit(sizeof(int) != 4);}], - [db_cv_int32="int"], -AC_TRY_RUN([main(){exit(sizeof(long) != 4);}], - [db_cv_int32="long"], [db_cv_int32=no])))]) + [db_cv_int32=yes])]) if test "$db_cv_int32" = no; then AC_MSG_ERROR([No signed 32-bit integral type.]) fi @@ -638,20 +404,40 @@ ncurses_ok=no gtk_ok=no -AC_MSG_CHECKING([for gtk-config in your path]) GTK_CONFIG=`which gtk-config` if test -x "$GTK_CONFIG"; then gtk_ok=yes fi -AC_MSG_RESULT($gtk_ok) +AC_MSG_CHECKING([for gtk db editor to be built]) +AC_ARG_ENABLE(gtk, [ --enable-gtk Enable gtk1.x based db editor], [ + if [ test "$enableval" = "yes" ]; then + AC_MSG_RESULT($gtk_ok) + else + AC_MSG_RESULT(no) + gtk_ok=no + fi + ], [ + AC_MSG_RESULT($gtk_ok) + ] +) +AM_CONDITIONAL(EDB_GTK_ED, test "$gtk_ok" = yes) AC_CHECK_LIB(ncurses, putwin, [AC_CHECK_HEADER(ncurses.h, ncurses_ok=yes, ncurses_ok=no)], ncurses_ok=no, -lncurses) - +AC_ARG_ENABLE(ncurses, [ --enable-ncurses Enable ncurses based db editor], [ + if [ test "$enableval" = "yes" ]; then + AC_MSG_RESULT($ncurses_ok) + else + AC_MSG_RESULT(no) + ncurses_ok=no + fi + ], [ + AC_MSG_RESULT($ncurses_ok) + ] +) AM_CONDITIONAL(EDB_VT_ED, test "$ncurses_ok" = yes) -AM_CONDITIONAL(EDB_GTK_ED, test "$gtk_ok" = yes) AC_OUTPUT([ Makefile ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs