[uae] Re: configure: WARNING: sys/mount.h: present but cannot be compiled

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Tue, 19 Oct 2004 02:31:18 -0500

Hi Bernhard

On Monday 18 October 2004 06:20 am, Bernhard Moellemann wrote:
> Ich just tried to compile e-uae-0.8.27-RC1 on NetBSD/i386 (2.0_BETA) and
> got the following from ./configure:
>
> configure: WARNING: sys/mount.h: present but cannot be compiled
> configure: WARNING: sys/mount.h:     check for missing prerequisite
> headers? configure: WARNING: sys/mount.h: see the Autoconf documentation
> configure: WARNING: sys/mount.h:     section "Present But Cannot Be
> Compiled" configure: WARNING: sys/mount.h: proceeding with the
> preprocessor's result configure: WARNING: sys/mount.h: in the future, the
> compiler will take precedence configure: WARNING:     ##
> -------------------------------- ##
> configure: WARNING:     ## Report this to the E-UAE lists.  ##
> configure: WARNING:     ## -------------------------------- ##

Thanks for sending me your config.log.

Try the attached patch. If you were on the right track and sys/param.h does 
need to be included before sys/mount.h then I think it should fix the 
problem.

Cheers,
Rich
--- /home/evilrich/e-uae-0.8.27-RC1/configure   2004-10-17 02:24:19.000000000 
-0500
+++ configure   2004-10-19 02:20:14.000000000 -0500
@@ -13186,8 +13186,7 @@
 
 
 
-
-for ac_header in sys/param.h sys/mount.h sys/vfs.h sys/fs_types.h
+for ac_header in sys/param.h sys/vfs.h sys/fs_types.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -13336,6 +13335,69 @@
 done
 
 
+for ac_header in sys/mount.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s 
conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
 
 echo "checking how to get filesystem space usage..."
 ac_fsusage_space=no
--- /home/evilrich/e-uae-0.8.27-RC1/configure.in        2004-10-17 
02:23:19.000000000 -0500
+++ configure.in        2004-10-19 02:19:58.000000000 -0500
@@ -137,7 +137,12 @@
 dnl
 dnl  Checks for fsuage
 dnl
-AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/vfs.h sys/fs_types.h)
+AC_CHECK_HEADERS(sys/param.h sys/vfs.h sys/fs_types.h)
+AC_CHECK_HEADERS(sys/mount.h, [], [], 
+[#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
 jm_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no])
 if test $gl_cv_fs_space = yes; then
   AC_LIBOBJ(fsusage)

Other related posts: