use AC_CHECK_HEADERS instead of AC_CHECK_FILE
This commit is contained in:
parent
7973baadba
commit
f215f7494e
|
@ -1168,30 +1168,39 @@ EOF
|
|||
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-I$CONFIG_KERNELDIR/include $CPPFLAGS"
|
||||
for ac_file in linux/isdn.h linux/b1lli.h linux/capi.h linux/kernelcapi.h
|
||||
for ac_hdr in linux/isdn.h linux/b1lli.h linux/capi.h linux/kernelcapi.h
|
||||
do
|
||||
|
||||
ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
|
||||
echo "configure:1177: checking for $ac_file" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1176: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1181 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=yes"
|
||||
else
|
||||
if test -r $ac_file; then
|
||||
eval "ac_cv_file_$ac_safe=yes"
|
||||
else
|
||||
eval "ac_cv_file_$ac_safe=no"
|
||||
fi
|
||||
echo "$ac_err" >&5
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_$ac_safe=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_file 1
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
|
||||
else
|
||||
|
@ -1205,13 +1214,13 @@ CPPFLAGS="$OLD_CPPFLAGS"
|
|||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
echo "configure:1209: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:1218: checking whether ${CC-cc} needs -traditional" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1215 "configure"
|
||||
#line 1224 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -1229,7 +1238,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1233 "configure"
|
||||
#line 1242 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -1253,12 +1262,12 @@ fi
|
|||
for ac_func in mmap
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:1257: checking for $ac_func" >&5
|
||||
echo "configure:1266: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1262 "configure"
|
||||
#line 1271 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1281,7 +1290,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
|
|
@ -23,7 +23,7 @@ dnl Check for kernel stuff
|
|||
AC_FIND_KERNEL
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-I$CONFIG_KERNELDIR/include $CPPFLAGS"
|
||||
AC_CHECK_FILES(linux/isdn.h linux/b1lli.h linux/capi.h linux/kernelcapi.h,,
|
||||
AC_CHECK_HEADERS(linux/isdn.h linux/b1lli.h linux/capi.h linux/kernelcapi.h,,
|
||||
AC_MSG_ERROR("Missing $ac_hdr. Kernel source installed?"))
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
|
||||
|
|
Loading…
Reference in New Issue