libart_lgpl r281 - trunk
- From: strba svn gnome org
- To: svn-commits-list gnome org
- Subject: libart_lgpl r281 - trunk
- Date: Wed, 14 Jan 2009 19:24:42 +0000 (UTC)
Author: strba
Date: Wed Jan 14 19:24:42 2009
New Revision: 281
URL: http://svn.gnome.org/viewvc/libart_lgpl?rev=281&view=rev
Log:
Allow crosscompiling without using different emulators
Added:
trunk/gen_art_config.sh.in
Removed:
trunk/gen_art_config.c
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/configure.in
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Wed Jan 14 19:24:42 2009
@@ -1,12 +1,14 @@
-noinst_PROGRAMS = testart testuta gen_art_config
+noinst_PROGRAMS = testart testuta
bin_SCRIPTS = \
libart2-config
+
+noinst_SCRIPTS = gen_art_config.sh
BUILT_SOURCES = art_config.h
-art_config.h: gen_art_config$(EXEEXT)
- ./gen_art_config > art_config.h
+art_config.h:
+ ./gen_art_config.sh > art_config.h
EXTRA_DIST = \
libart.def \
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Jan 14 19:24:42 2009
@@ -92,6 +92,15 @@
AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(char)
+AC_SUBST(ART_SIZEOF_CHAR, $ac_cv_sizeof_char)
+AC_CHECK_SIZEOF(short)
+AC_SUBST(ART_SIZEOF_SHORT, $ac_cv_sizeof_short)
+AC_CHECK_SIZEOF(int)
+AC_SUBST(ART_SIZEOF_INT, $ac_cv_sizeof_int)
+AC_CHECK_SIZEOF(long)
+AC_SUBST(ART_SIZEOF_LONG, $ac_cv_sizeof_long)
+
AC_CONFIG_FILES([
libart-features.h
Makefile
@@ -100,5 +109,6 @@
libart-zip])
AC_CONFIG_FILES([libart-config],[chmod +x libart-config])
+AC_CONFIG_FILES([gen_art_config.sh],[chmod +x gen_art_config.sh])
AC_OUTPUT
Added: trunk/gen_art_config.sh.in
==============================================================================
--- (empty file)
+++ trunk/gen_art_config.sh.in Wed Jan 14 19:24:42 2009
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# A little utility function to generate header info.
+#
+# The output of this program is generally written to art_config.h,
+# which is installed in libart's include dir.
+
+
+echo "/* Automatically generated by gen_art_config */"
+echo
+echo "#define ART_SIZEOF_CHAR @ART_SIZEOF_CHAR@"
+echo "#define ART_SIZEOF_SHORT @ART_SIZEOF_SHORT@"
+echo "#define ART_SIZEOF_INT @ART_SIZEOF_INT@"
+echo "#define ART_SIZEOF_LONG @ART_SIZEOF_LONG@"
+echo
+
+if test @ART_SIZEOF_CHAR@ -eq 1; then
+ echo "typedef unsigned char art_u8;"
+else
+ echo 1>&2 "sizeof(char) != 1"
+ exit 1
+fi
+
+if test @ART_SIZEOF_SHORT@ -eq 2; then
+ echo "typedef unsigned short art_u16;"
+else
+ echo 1>&2 "sizeof(short) != 2"
+ exit 2
+fi
+
+if test @ART_SIZEOF_INT@ -eq 4; then
+ echo "typedef unsigned int art_u32;"
+else
+ if test @ART_SIZEOF_LONG@ -eq 4; then
+ echo "typedef unsigned long art_u32;"
+ else
+ echo 1>&2 "sizeof(int) != 4 and sizeof(long) != 4"
+ exit 3
+ fi
+fi
+
+exit 0
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]