Re: [sqlite] [patch] cleanup cross-compiling logic

2007-02-17 Thread Mike Frysinger
On Friday 16 February 2007, Joe Wilson wrote:
> The sqlite autoconf stuff has been neglected for a while...

ive merged my changes to CVS and i'll take a look at the open issues
-mike


pgpUTe4GZT41c.pgp
Description: PGP signature


Re: [sqlite] [patch] cleanup cross-compiling logic

2007-02-17 Thread Mike Frysinger
On Friday 16 February 2007, Joe Wilson wrote:
> The sqlite autoconf stuff has been neglected for a while...
>
>  http://marc.10east.com/?l=sqlite-users=116760371614235=2

i dont have a problem tackling these issues if my fixes would get merged ... i 
know autotools is a huge headache for a lot of people/projects, so i dont 
mind helping out

> Consider making a ticket for this issue and mentioning it in this autoconf
> meta ticket:
>
>  http://www.sqlite.org/cvstrac/tktview?tn=2133

sure ... looks like my readline patch addresses #1966 :)
-mike


pgpnMM2TgjQGn.pgp
Description: PGP signature


Re: [sqlite] [patch] cleanup cross-compiling logic

2007-02-16 Thread Joe Wilson
The sqlite autoconf stuff has been neglected for a while...

 http://marc.10east.com/?l=sqlite-users=116760371614235=2

Consider making a ticket for this issue and mentioning it in this autoconf meta 
ticket: 

 http://www.sqlite.org/cvstrac/tktview?tn=2133

--- Mike Frysinger <[EMAIL PROTECTED]> wrote:
> for some reason the current configure script tries to implement its own 
> cross-compiling logic which ends up being pretty fragile ... the attached 
> patch punts pretty much all of it in favor of the standard method that just 
> about every other autoconf-based project uses
> 
> there is one more small change required that i didnt include because it'll 
> conflict with the previous readline patch i sent out:
...


 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] [patch] cleanup cross-compiling logic

2007-02-16 Thread Mike Frysinger
for some reason the current configure script tries to implement its own 
cross-compiling logic which ends up being pretty fragile ... the attached 
patch punts pretty much all of it in favor of the standard method that just 
about every other autoconf-based project uses

there is one more small change required that i didnt include because it'll 
conflict with the previous readline patch i sent out:
 # Figure out what C libraries are required to compile programs
 # that use "fdatasync()" function.
 #
-CC=$TARGET_CC
-LIBS=$TARGET_LIBS
 AC_SEARCH_LIBS(fdatasync, [rt])
-TARGET_LIBS="$LIBS"
 
-mike


pgpxwZX1CkC87.pgp
Description: PGP signature
Index: configure.ac
===
RCS file: /sqlite/sqlite/configure.ac,v
retrieving revision 1.26
diff -u -p -r1.26 configure.ac
--- configure.ac	3 Jun 2006 18:02:18 -	1.26
+++ configure.ac	16 Feb 2007 23:53:20 -
@@ -45,18 +45,6 @@
 #The filename extension for executables on the build
 #platform.  "" for Unix and ".exe" for Windows.
 #
-#TARGET_CC
-#
-#The name of a command that runs on the build platform
-#and converts C source files into *.o files for the
-#target platform.  In other words, the cross-compiler.
-#
-#TARGET_CFLAGS
-#
-#Switches that the target compiler needs to turn C source files
-#into *.o files.  Do not include TARGET_TCL_INC in this list.
-#Makefiles might add additional switches such as "-I.".
-#
 #TCL_*
 #
 #Lots of values are read in from the tclConfig.sh script,
@@ -76,18 +64,6 @@
 #files for the readline library.  If the compiler is able 
 #to find  on its own, then this can be blank.
 #
-#TARGET_LINK
-#
-#The name of the linker that combines *.o files generated
-#by TARGET_CC into executables for the target platform.
-#
-#TARGET_LIBS
-#
-#Additional libraries or other switch that the target linker needs
-#to build an executable on the target.  Do not include
-#on this list any libraries in TARGET_TCL_LIBS and
-#TARGET_READLINE_LIBS, etc.
-#
 #TARGET_EXEEXT
 #
 #The filename extension for executables on the
@@ -184,96 +160,19 @@ fi
 # Locate a compiler for the build machine.  This compiler should
 # generate command-line programs that run on the build machine.
 #
-default_build_cflags="-g"
-if test "$config_BUILD_CC" = ""; then
-  AC_PROG_CC
-  if test "$cross_compiling" = "yes"; then
-AC_MSG_ERROR([unable to find a compiler for building build tools])
-  fi
-  BUILD_CC=$CC
-  default_build_cflags=$CFLAGS
-else
-  BUILD_CC=$config_BUILD_CC
-  AC_MSG_CHECKING([host compiler])
-  CC=$BUILD_CC
-  AC_MSG_RESULT($BUILD_CC)
-fi
-AC_MSG_CHECKING([switches for the host compiler])
-if test "$config_BUILD_CFLAGS" != ""; then
-  CFLAGS=$config_BUILD_CFLAGS
-  BUILD_CFLAGS=$config_BUILD_CFLAGS
-else
-  BUILD_CFLAGS=$default_build_cflags
-fi
-AC_MSG_RESULT($BUILD_CFLAGS)
-if test "$config_BUILD_LIBS" != ""; then
-  BUILD_LIBS=$config_BUILD_LIBS
+if test x"$cross_compiling" = xno; then
+	BUILD_CC=$CC
+	BUILD_CFLAGS=$CFLAGS
+else
+	if test "${BUILD_CC+set}" != set; then
+		AC_CHECK_PROGS(BUILD_CC, gcc cc cl)
+	fi
+	if test "${BUILD_CFLAGS+set}" != set; then
+		BUILD_CFLAGS="-g"
+	fi
 fi
 AC_SUBST(BUILD_CC)
 AC_SUBST(BUILD_CFLAGS)
-AC_SUBST(BUILD_LIBS)
-
-##
-# Locate a compiler that converts C code into *.o files that run on
-# the target machine.
-#
-AC_MSG_CHECKING([target compiler])
-if test "$config_TARGET_CC" != ""; then
-  TARGET_CC=$config_TARGET_CC
-else
-  TARGET_CC=$BUILD_CC
-fi
-AC_MSG_RESULT($TARGET_CC)
-AC_MSG_CHECKING([switches on the target compiler])
-if test "$config_TARGET_CFLAGS" != ""; then
-  TARGET_CFLAGS=$config_TARGET_CFLAGS
-else
-  TARGET_CFLAGS=$BUILD_CFLAGS
-fi
-AC_MSG_RESULT($TARGET_CFLAGS)
-AC_MSG_CHECKING([target linker])
-if test "$config_TARGET_LINK" = ""; then
-  TARGET_LINK=$TARGET_CC
-else
-  TARGET_LINK=$config_TARGET_LINK
-fi
-AC_MSG_RESULT($TARGET_LINK)
-AC_MSG_CHECKING([switches on the target compiler])
-if test "$config_TARGET_TFLAGS" != ""; then
-  TARGET_TFLAGS=$config_TARGET_TFLAGS
-else
-  TARGET_TFLAGS=$BUILD_CFLAGS
-fi
-if test "$config_TARGET_RANLIB" != ""; then
-  TARGET_RANLIB=$config_TARGET_RANLIB
-else
-  AC_PROG_RANLIB
-  TARGET_RANLIB=$RANLIB
-fi
-if test "$config_TARGET_AR" != ""; then
-  TARGET_AR=$config_TARGET_AR
-else
-  TARGET_AR='ar cr'
-fi
-AC_MSG_RESULT($TARGET_TFLAGS)
-AC_SUBST(TARGET_CC)
-AC_SUBST(TARGET_CFLAGS)
-AC_SUBST(TARGET_LINK)
-AC_SUBST(TARGET_LFLAGS)
-AC_SUBST(TARGET_RANLIB)
-AC_SUBST(TARGET_AR)
-
-# Set the $cross variable if we are cross-compiling.  Make
-# it 0 if we are not.
-#
-AC_MSG_CHECKING([if host and target compilers are the same])
-if test "$BUILD_CC" = "$TARGET_CC"; then
-  cross=0
-  AC_MSG_RESULT(yes)
-else
-  cross=1
-  AC_MSG_RESULT(no)
-fi
 
 ##
 # Do we want to support multithreaded use of sqlite
@@ -401,7 +300,7 @@ if