diff options
author | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2007-05-17 05:23:46 +0000 |
---|---|---|
committer | michael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2007-05-17 05:23:46 +0000 |
commit | 93d751a7c3d5c6c1db576460a7f08bd80a0f3bb9 (patch) | |
tree | d185959df2d34af436e9da7c37c7759983509aa1 | |
parent | db6911f350d69aa5fe72254c3104b5e8e3082b32 (diff) | |
download | lcd4linux-93d751a7c3d5c6c1db576460a7f08bd80a0f3bb9.tar.gz |
compile error on m68k fixed (debian bug 405898)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@799 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rwxr-xr-x | configure | 163 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | drivers.m4 | 12 |
3 files changed, 170 insertions, 10 deletions
@@ -6341,6 +6341,155 @@ fi done +# check for sys/io.h (RouterBoard driver) + +for ac_header in sys/io.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------- ## +## Report this to lcd4linux-users@lists.sourceforge.net ## +## ---------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + has_io_h="true" +else + has_io_h="false" +fi + +done + + # check for usb.h for ac_header in usb.h @@ -7685,14 +7834,19 @@ _ACEOF fi if test "$ROUTERBOARD" = "yes"; then - TEXT="yes" - GPIO="yes" - DRIVERS="$DRIVERS drv_RouterBoard.o" + if test "$has_io_h" = "true"; then + TEXT="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_RouterBoard.o" cat >>confdefs.h <<\_ACEOF #define WITH_ROUTERBOARD 1 _ACEOF + else + { echo "$as_me:$LINENO: WARNING: sys/io.h not found: RouterBoard driver disabled" >&5 +echo "$as_me: WARNING: sys/io.h not found: RouterBoard driver disabled" >&2;} + fi fi if test "$SAMPLE" = "yes"; then @@ -10701,8 +10855,7 @@ fi done - -for ac_header in sys/io.h asm/io.h +for ac_header in asm/io.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/configure.in b/configure.in index 6ba2de0..5aeabc9 100644 --- a/configure.in +++ b/configure.in @@ -65,6 +65,9 @@ fi # check for gd.h AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd="true"; break], [has_gd="false"]) +# check for sys/io.h (RouterBoard driver) +AC_CHECK_HEADERS(sys/io.h, [has_io_h="true"], [has_io_h="false"]) + # check for usb.h AC_CHECK_HEADERS(usb.h, [has_usb="true"], [has_usb="false"]) @@ -97,7 +100,7 @@ sinclude(plugins.m4) AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h]) -AC_CHECK_HEADERS(sys/io.h asm/io.h) +AC_CHECK_HEADERS(asm/io.h) AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h) AC_CHECK_HEADERS(asm/msr.h) @@ -420,10 +420,14 @@ if test "$PPM" = "yes"; then fi if test "$ROUTERBOARD" = "yes"; then - TEXT="yes" - GPIO="yes" - DRIVERS="$DRIVERS drv_RouterBoard.o" - AC_DEFINE(WITH_ROUTERBOARD,1,[RouterBoard driver]) + if test "$has_io_h" = "true"; then + TEXT="yes" + GPIO="yes" + DRIVERS="$DRIVERS drv_RouterBoard.o" + AC_DEFINE(WITH_ROUTERBOARD,1,[RouterBoard driver]) + else + AC_MSG_WARN(sys/io.h not found: RouterBoard driver disabled) + fi fi if test "$SAMPLE" = "yes"; then |