AC_INIT([GNU FriBidi],
fribidi_version(),
- [http://bugs.freedesktop.org/enter_bug.cgi?product=fribidi],
+ [https://github.com/fribidi/fribidi/issues/new],
[fribidi],
[http://fribidi.org/])
fi
AM_CONDITIONAL(FRIBIDI_USE_GLIB, test x$FRIBIDI_USE_GLIB = x1)
+# A hack for supporting cross compilation
+if test $host != $build; then
+ BUILD_CC="gcc"
+ BUILD_CFLAGS="-O2 -g"
+ BUILD_LDFLAGS=""
+ BUILD_EXEEXT=""
+else
+ BUILD_CC="${CC}"
+ BUILD_CFLAGS="${CFLAGS}"
+ BUILD_LDFLAGS="${LDFLAGS}"
+ BUILD_EXEEXT="${EXEEXT}"
+fi
+
+# Continuation of hack to set up the proper include directories
+BUILD_CFLAGS="${BUILD_CFLAGS} -DHAVE_CONFIG_H -I.. -I../lib"
+
+AC_ARG_VAR([BUILD_CC])
+AC_ARG_VAR([BUILD_CFLAGS])
+AC_ARG_VAR([BUILD_LDFLAGS])
+AC_ARG_VAR([BUILD_EXEEXT])
+
# Generate output
AC_CONFIG_FILES([fribidi.pc
lib/fribidi-config.h
DerivedBidiClass.txt \
fribidi-unicode-version.h \
$(gen_bidi_type_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_bidi_type_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_bidi_type_tab) $(gen_bidi_type_tab_SOURCES)
./$(gen_bidi_type_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
UnicodeData.txt \
fribidi-unicode-version.h \
$(gen_bidi_type_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_bidi_type_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_bidi_type_tab) $(gen_bidi_type_tab_SOURCES)
./$(gen_bidi_type_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
ArabicShaping.txt \
fribidi-unicode-version.h \
$(gen_joining_type_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_joining_type_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_joining_type_tab) $(gen_joining_type_tab_SOURCES)
./$(gen_joining_type_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
UnicodeData.txt \
fribidi-unicode-version.h \
$(gen_arabic_shaping_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_arabic_shaping_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_arabic_shaping_tab) $(gen_arabic_shaping_tab_SOURCES)
./$(gen_arabic_shaping_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
BidiMirroring.txt \
fribidi-unicode-version.h \
$(gen_mirroring_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_mirroring_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_mirroring_tab) $(gen_mirroring_tab_SOURCES)
./$(gen_mirroring_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
UnicodeData.txt \
fribidi-unicode-version.h \
$(gen_brackets_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_brackets_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_brackets_tab) $(gen_brackets_tab_SOURCES)
./$(gen_brackets_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
BidiBrackets.txt \
fribidi-unicode-version.h \
$(gen_brackets_type_tab_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_brackets_type_tab)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_brackets_type_tab) $(gen_brackets_type_tab_SOURCES)
./$(gen_brackets_type_tab) $(COMPRESSION) $^ > $@ \
|| ($(RM) $@ && false)
ReadMe.txt \
BidiMirroring.txt \
$(gen_unicode_version_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) $(gen_unicode_version)
+ $(BUILD_CC) $(BUILD_CFLAGS) -o $(gen_unicode_version) $(gen_unicode_version_SOURCES)
./$(gen_unicode_version) $^ > $@ \
|| ($(RM) $@ && false)
gen: $(EXTRA_PROGRAMS)
$(top_builddir)/config.h: $(top_srcdir)/config.h.in
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h
+ cd $(top_builddir) && $(BUILD_CC) $(BUILD_CFLAGS) -o config.h
$(top_builddir)/lib/fribidi-config.h: $(top_srcdir)/lib/fribidi-config.h.in
- cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) fribidi-config.h
+ cd $(top_builddir)/lib && $(BUILD_CC) $(BUILD_CFLAGS) -o fribidi-config.h
.PHONY: gen