Hi,

as added to trac with ticket #58, the tools 'lemon' and 
'mkkeywordhash' are programs compiled as helpers on the host
during build and are not installed/used with openpbx installation.

The current build (Makefile.am) uses the standard compiler (CC), which is 
wrong when cross compiling, HOST_CC must be used instead.
As far as I remember, automake/autoconf lacks support for a clean way of
creating native host-tools when cross compiling. In addition, I'm not a
automake/autoconf/configure expert.
Anyway, the patch below fixes the ticket. But HOST_CC must be set for that.
Since I don't know the best way to set HOST_CC to 'gcc' by default and if 
not set otherwise, maybe someone can help here to complete this ticket and
add the HOST_CC setting in configure.ac?.

Armin


diff -ur OpenPBX.orig/sqlite3-embedded/Makefile.am 
OpenPBX/sqlite3-embedded/Makefile.am
--- OpenPBX.orig/sqlite3-embedded/Makefile.am   2005-11-17 20:34:40.404499188 
+0100
+++ OpenPBX/sqlite3-embedded/Makefile.am        2005-11-17 21:23:00.403603063 
+0100
@@ -46,8 +46,12 @@
        ${SED} -e s/--VERS--/$(RELEASE)/ $(srcdir)/src/sqlite.h.in | \
        ${SED} -e s/--VERSION-NUMBER--/$(VERSION_NUMBER)/ > sqlite3.h
 
-noinst_PROGRAMS = lemon mkkeywordhash
+lemon: tool/lemon.c
+       $(HOST_CC) -o $@ $<
+       
+mkkeywordhash: tool/mkkeywordhash.c
+       $(HOST_CC) -o $@ $<
+
 
-lemon_SOURCES = tool/lemon.c
+noinst_PROGRAMS = lemon mkkeywordhash
 
-mkkeywordhash_SOURCES = tool/mkkeywordhash.c
_______________________________________________
Openpbx-dev mailing list
[EMAIL PROTECTED]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to