diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | configure | 56 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | makeopts.in | 2 | ||||
-rw-r--r-- | wct4xxp/Makefile | 3 | ||||
-rw-r--r-- | xpp/utils/Makefile | 3 |
6 files changed, 44 insertions, 29 deletions
@@ -9,8 +9,6 @@ .PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules linux24 linux26 xpp tests devel data stackcheck install-udev config update install-programs install-modules install-linux24 install-linux26 firmware install-include install-libs -HOSTCC=gcc -CC=gcc PWD=$(shell pwd) ifeq ($(DEB_HOST_GNU_TYPE),) @@ -255,7 +253,8 @@ tor2fw.h: tormenta2.rbt makefw radfw.h: pciradio.rbt makefw ./makefw $< radfw > $@ -makefw: CFLAGS= +makefw: makefw.c + $(HOSTCC) -o $@ $^ gendigits: LDLIBS+=-lm gendigits: CFLAGS= @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision: 1297 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60. +# Generated by GNU Autoconf 2.60a. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -569,36 +569,36 @@ ac_unique_file="zaptel.c" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include <strings.h> #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include <stdint.h> #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include <unistd.h> #endif" @@ -652,6 +652,7 @@ INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE +HOSTCC GREP LN EGREP @@ -1320,7 +1321,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.60 +generated by GNU Autoconf 2.60a Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1336,7 +1337,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.60a. Invocation command line was $ $0 $@ @@ -2111,7 +2112,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2139,6 +2140,12 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2150,8 +2157,6 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -3113,6 +3118,10 @@ fi +# Set the default value of HOSTCC from CC if --host was not provided: +HOSTCC=${HOSTCC:=${CC}} + + # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -3784,7 +3793,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_curses_initscr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4264,7 +4273,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_initscr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4744,7 +4753,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_newt_newtBell=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5542,7 +5551,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.60a. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5569,7 +5578,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -5585,7 +5594,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.60, +configured by $0, generated by GNU Autoconf 2.60a, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -5795,6 +5804,7 @@ INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim LN_S!$LN_S$ac_delim GNU_MAKE!$GNU_MAKE$ac_delim +HOSTCC!$HOSTCC$ac_delim GREP!$GREP$ac_delim LN!$LN$ac_delim EGREP!$EGREP$ac_delim @@ -5811,7 +5821,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.ac b/configure.ac index 7fbf880..fea925c 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,10 @@ AC_PROG_INSTALL AC_PROG_LN_S AST_CHECK_GNU_MAKE +# Set the default value of HOSTCC from CC if --host was not provided: +HOSTCC=${HOSTCC:=${CC}} +AC_SUBST(HOSTCC) + AC_PATH_PROG([GREP], [grep], :) AC_PATH_PROG([SHELL], [sh], :) AC_PATH_PROG([LN], [ln], :) diff --git a/makeopts.in b/makeopts.in index 05bc0b5..dd60395 100644 --- a/makeopts.in +++ b/makeopts.in @@ -1,5 +1,5 @@ CC=@CC@ -HOST_CC=@CC@ +HOSTCC=@HOSTCC@ INSTALL=@INSTALL@ GREP=@GREP@ diff --git a/wct4xxp/Makefile b/wct4xxp/Makefile index aea3d12..5c818a4 100644 --- a/wct4xxp/Makefile +++ b/wct4xxp/Makefile @@ -19,7 +19,8 @@ vpm450m.o: vpm450m.h vpm450m_fw.h ../oct612x/include/oct6100api/oct6100_api.h wct4xxp.o: base.o vpm450m.o $(OCTASIC_OBJS) $(LD) -r -o $@ $^ -fw2h: CFLAGS= +fw2h: fw2h.c + $(HOSTCC) -o $@ $^ vpm450m_fw.h: OCT6114-128D.ima fw2h ./fw2h $< $@ diff --git a/xpp/utils/Makefile b/xpp/utils/Makefile index 7dc4fa2..b7d77f3 100644 --- a/xpp/utils/Makefile +++ b/xpp/utils/Makefile @@ -48,7 +48,8 @@ test_parse.o: test_parse.c hexfile.h test_parse: test_parse.o libhexfile.a $(CC) -L. -o $@ $@.o $(EXTRA_LIBS) -lhexfile -lusb -print_modes.o: wctdm_fxomodes.h +print_modes.o: print_modes.c wctdm_fxomodes.h + $(HOSTCC) $(CFLAGS) -c $^ wctdm_fxomodes.h: $(WCTDM) perl -n -e 'print if (/^static struct fxo_mode {$$/ .. /};$$/)' $(WCTDM) >$@ |