aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.in14
-rw-r--r--tools/lemon/Makefile.am4
3 files changed, 16 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 346a9b6760..a4b7f0b9a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -416,7 +416,7 @@ ps.c: print.ps rdps
./rdps $(srcdir)/print.ps ps.c
rdps: rdps.c
- $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o rdps $(srcdir)/rdps.c
randpkt_additional_libs = wiretap/libwiretap.la
diff --git a/configure.in b/configure.in
index 961deeb78f..361a6b1c6a 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,13 @@ AC_INIT(cfile.h)
AC_PREREQ(2.52)
dnl Check for CPU / vendor / OS
-AC_CANONICAL_HOST
+dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
+dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
+dnl needs. Using `AC_CANONICAL_TARGET' is enough to run the two other
+dnl macros.
+
+dnl AC_CANONICAL_HOST
+dnl AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(wireshark, 0.99.4)
@@ -58,6 +64,12 @@ AC_SUBST(PYTHON)
AC_SUBST(XSLTPROC)
AC_SUBST(XMLLINT)
+if test "x$CC_FOR_BUILD" = x
+then
+ CC_FOR_BUILD=$(CC)
+fi
+AC_SUBST(CC_FOR_BUILD)
+
# Check for doxygen
AC_PATH_PROG(DOXYGEN, doxygen)
AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
diff --git a/tools/lemon/Makefile.am b/tools/lemon/Makefile.am
index acdca29d65..d97511d066 100644
--- a/tools/lemon/Makefile.am
+++ b/tools/lemon/Makefile.am
@@ -34,8 +34,8 @@ CLEANFILES = \
MAINTAINERCLEANFILES = \
Makefile.in
-lemon_SOURCES = \
- lemon.c
+lemon: lemon.c
+ $(CC_FOR_BUILD) -D_U_="" $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
EXTRA_DIST = \
cppmagic.h \