Added CONFIG_KERNELDIR for non standard location of kernel source.
Needed for icnctrl, pcbitctl and loopctrl.
This commit is contained in:
parent
7dc9933638
commit
7086d157b1
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2
|
||||
INCLUDES = -I. @DEBUGVAR@ -I@KERNELDIR@drivers/isdn/icn
|
||||
INCLUDES = -I. @DEBUGVAR@ -I@KERNELDIR@/drivers/isdn/icn
|
||||
DEFS =
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAM = icnctrl
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
dnl
|
||||
dnl Try finding linux sourcetree
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_FIND_KERNEL, [
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=DIR Set kernel source directory [/usr/src/linux]],
|
||||
DOTEST="y"; tst_kerneldir="${withval}")
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in ${tst_kerneldir}])
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=${tst_kerneldir},
|
||||
AC_MSG_RESULT("no"))
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/src/linux)
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_RESULT("$lxdir")
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/local/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/local/src/linux)
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
AC_MSG_RESULT("yes")
|
||||
else
|
||||
lxdir=""
|
||||
AC_MSG_ERROR("Kernel source not found. You MUST specify a correct path to the linux source in the configuration.")
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
AC_DEFINE_UNQUOTED(KERNELDIR,"$lxdir")
|
||||
AC_SUBST(KERNELDIR)
|
||||
])
|
|
@ -13,7 +13,9 @@ ac_default_prefix=/usr/local
|
|||
# Any additions from configure.in:
|
||||
ac_default_prefix=/usr
|
||||
ac_help="$ac_help
|
||||
--enable-dump Enable dump feature for debugging"
|
||||
--with-kernel=DIR Set kernel source directory [/usr/src/linux]"
|
||||
ac_help="$ac_help
|
||||
--enable-dump Enable dump feature for debugging"
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
|
@ -685,7 +687,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -739,13 +741,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 743 "configure"
|
||||
#line 745 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -754,13 +756,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 758 "configure"
|
||||
#line 760 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -789,11 +791,11 @@ else
|
|||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 793 "configure"
|
||||
#line 795 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
|
@ -811,7 +813,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 815 "configure"
|
||||
#line 817 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -819,7 +821,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -834,7 +836,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 838 "configure"
|
||||
#line 840 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -852,7 +854,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 856 "configure"
|
||||
#line 858 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -873,7 +875,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 877 "configure"
|
||||
#line 879 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -884,7 +886,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
:
|
||||
else
|
||||
|
@ -911,12 +913,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 915 "configure"
|
||||
#line 917 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -941,7 +943,6 @@ fi
|
|||
done
|
||||
|
||||
|
||||
|
||||
for ac_hdr in linux/isdn.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
|
||||
|
@ -950,12 +951,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 954 "configure"
|
||||
#line 955 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -973,16 +974,97 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
\
|
||||
{ echo "configure: error: "Missing linux/isdn.h. Kernel source installed?"" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
# Check whether --with-kernel or --without-kernel was given.
|
||||
if test "${with_kernel+set}" = set; then
|
||||
withval="$with_kernel"
|
||||
DOTEST="y"; tst_kerneldir="${withval}"
|
||||
fi
|
||||
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
echo $ac_n "checking for linux kernel source in ${tst_kerneldir}""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1000 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=${tst_kerneldir}
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
echo "$ac_t"""no"" 1>&6
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo $ac_n "checking for linux kernel source in /usr/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1021 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo "$ac_t"""$lxdir"" 1>&6
|
||||
echo $ac_n "checking for linux kernel source in /usr/local/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1041 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/local/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
echo "$ac_t"""yes"" 1>&6
|
||||
else
|
||||
lxdir=""
|
||||
{ echo "configure: error: "Kernel source not found. You MUST specify a correct path to the linux source in the configuration."" 1>&2; exit 1; }
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
cat >> confdefs.h <<EOF
|
||||
#define KERNELDIR "$lxdir"
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
|
@ -992,7 +1074,7 @@ if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
|||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 996 "configure"
|
||||
#line 1078 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -1010,7 +1092,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1014 "configure"
|
||||
#line 1096 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -1038,7 +1120,7 @@ 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 1042 "configure"
|
||||
#line 1124 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1062,7 +1144,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1092,7 +1174,7 @@ else
|
|||
ac_cv_func_mmap=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1096 "configure"
|
||||
#line 1178 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Thanks to Mike Haertel and Jim Avera for this test. */
|
||||
|
@ -1161,7 +1243,7 @@ main()
|
|||
}
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_func_mmap=yes
|
||||
else
|
||||
|
@ -1193,7 +1275,6 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -1327,8 +1408,8 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
|||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CC@%$CC%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@KERNELDIR@%$KERNELDIR%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@DEBUGVAR@%$DEBUGVAR%g
|
||||
s%@MANDATE@%$MANDATE%g
|
||||
s%@I4LCONFDIR@%$I4LCONFDIR%g
|
||||
|
|
|
@ -16,14 +16,9 @@ dnl Checks for header files.
|
|||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h)
|
||||
dnl Find current kernel source
|
||||
dnl done by dereferencing the symbolic link /usr/include/linux
|
||||
dnl and then stripping off include/linux from the result.
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h,\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`", \
|
||||
AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
|
||||
|
||||
AC_FIND_KERNEL
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
|
@ -32,11 +27,10 @@ AC_PROG_GCC_TRADITIONAL
|
|||
AC_FUNC_MMAP
|
||||
|
||||
dnl Check, if user wants dump option for debugging
|
||||
AC_ARG_ENABLE(dump,--enable-dump Enable dump feature for debugging,\
|
||||
AC_ARG_ENABLE(dump,[ --enable-dump Enable dump feature for debugging],\
|
||||
DEBUGVAR=-D__DEBUGVAR__)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(KERNELDIR)
|
||||
AC_SUBST(DEBUGVAR)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(I4LCONFDIR)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
dnl
|
||||
dnl Try finding linux sourcetree
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_FIND_KERNEL, [
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=DIR Set kernel source directory [/usr/src/linux]],
|
||||
DOTEST="y"; tst_kerneldir="${withval}")
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in ${tst_kerneldir}])
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=${tst_kerneldir},
|
||||
AC_MSG_RESULT("no"))
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/src/linux)
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_RESULT("$lxdir")
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/local/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/local/src/linux)
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
AC_MSG_RESULT("yes")
|
||||
else
|
||||
lxdir=""
|
||||
AC_MSG_ERROR("Kernel source not found. You MUST specify a correct path to the linux source in the configuration.")
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
AC_DEFINE_UNQUOTED(KERNELDIR,"$lxdir")
|
||||
AC_SUBST(KERNELDIR)
|
||||
])
|
|
@ -12,6 +12,8 @@ ac_help=
|
|||
ac_default_prefix=/usr/local
|
||||
# Any additions from configure.in:
|
||||
ac_default_prefix=/usr
|
||||
ac_help="$ac_help
|
||||
--with-kernel=DIR Set kernel source directory [/usr/src/linux]"
|
||||
ac_help="$ac_help
|
||||
--enable-dump Enable dump feature for debugging"
|
||||
|
||||
|
@ -685,7 +687,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -739,13 +741,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 743 "configure"
|
||||
#line 745 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -754,13 +756,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 758 "configure"
|
||||
#line 760 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -789,11 +791,11 @@ else
|
|||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 793 "configure"
|
||||
#line 795 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
|
@ -811,7 +813,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 815 "configure"
|
||||
#line 817 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -819,7 +821,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -834,7 +836,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 838 "configure"
|
||||
#line 840 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -852,7 +854,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 856 "configure"
|
||||
#line 858 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -873,7 +875,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 877 "configure"
|
||||
#line 879 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -884,7 +886,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
:
|
||||
else
|
||||
|
@ -911,12 +913,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 915 "configure"
|
||||
#line 917 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -941,7 +943,6 @@ fi
|
|||
done
|
||||
|
||||
|
||||
|
||||
for ac_hdr in linux/isdn.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
|
||||
|
@ -950,12 +951,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 954 "configure"
|
||||
#line 955 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -973,16 +974,97 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
\
|
||||
{ echo "configure: error: "Missing linux/isdn.h. Kernel source installed?"" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
# Check whether --with-kernel or --without-kernel was given.
|
||||
if test "${with_kernel+set}" = set; then
|
||||
withval="$with_kernel"
|
||||
DOTEST="y"; tst_kerneldir="${withval}"
|
||||
fi
|
||||
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
echo $ac_n "checking for linux kernel source in ${tst_kerneldir}""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1000 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=${tst_kerneldir}
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
echo "$ac_t"""no"" 1>&6
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo $ac_n "checking for linux kernel source in /usr/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1021 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo "$ac_t"""$lxdir"" 1>&6
|
||||
echo $ac_n "checking for linux kernel source in /usr/local/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1041 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/local/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
echo "$ac_t"""yes"" 1>&6
|
||||
else
|
||||
lxdir=""
|
||||
{ echo "configure: error: "Kernel source not found. You MUST specify a correct path to the linux source in the configuration."" 1>&2; exit 1; }
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
cat >> confdefs.h <<EOF
|
||||
#define KERNELDIR "$lxdir"
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
|
@ -992,7 +1074,7 @@ if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
|||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 996 "configure"
|
||||
#line 1078 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -1010,7 +1092,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1014 "configure"
|
||||
#line 1096 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -1038,7 +1120,7 @@ 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 1042 "configure"
|
||||
#line 1124 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1062,7 +1144,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1092,7 +1174,7 @@ else
|
|||
ac_cv_func_mmap=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1096 "configure"
|
||||
#line 1178 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Thanks to Mike Haertel and Jim Avera for this test. */
|
||||
|
@ -1161,7 +1243,7 @@ main()
|
|||
}
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_func_mmap=yes
|
||||
else
|
||||
|
@ -1193,7 +1275,6 @@ fi
|
|||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -1327,8 +1408,8 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
|||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CC@%$CC%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@KERNELDIR@%$KERNELDIR%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@DEBUGVAR@%$DEBUGVAR%g
|
||||
s%@MANDATE@%$MANDATE%g
|
||||
s%@I4LCONFDIR@%$I4LCONFDIR%g
|
||||
|
|
|
@ -16,14 +16,9 @@ dnl Checks for header files.
|
|||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h)
|
||||
dnl Find current kernel source
|
||||
dnl done by dereferencing the symbolic link /usr/include/linux
|
||||
dnl and then stripping off include/linux from the result.
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h,\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`", \
|
||||
AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
|
||||
|
||||
AC_FIND_KERNEL
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
|
@ -36,7 +31,6 @@ AC_ARG_ENABLE(dump,--enable-dump Enable dump feature for debugging,\
|
|||
DEBUGVAR=-D__DEBUGVAR__)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(KERNELDIR)
|
||||
AC_SUBST(DEBUGVAR)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(I4LCONFDIR)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -Wstrict-prototypes -O2 -g
|
||||
INCLUDES = -I. -DDEBUG -I@KERNELDIR@drivers/isdn/pcbit
|
||||
INCLUDES = -I. -DDEBUG -I@KERNELDIR@/drivers/isdn/pcbit
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAM = pcbitctl
|
||||
MODULES = pcbitctl.o convhexbin.o
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
dnl
|
||||
dnl Try finding linux sourcetree
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_FIND_KERNEL, [
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=DIR Set kernel source directory [/usr/src/linux]],
|
||||
DOTEST="y"; tst_kerneldir="${withval}")
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in ${tst_kerneldir}])
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=${tst_kerneldir},
|
||||
AC_MSG_RESULT("no"))
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/src/linux)
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_RESULT("$lxdir")
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/local/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/local/src/linux)
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
AC_MSG_RESULT("yes")
|
||||
else
|
||||
lxdir=""
|
||||
AC_MSG_ERROR("Kernel source not found. You MUST specify a correct path to the linux source in the configuration.")
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
AC_DEFINE_UNQUOTED(KERNELDIR,"$lxdir")
|
||||
AC_SUBST(KERNELDIR)
|
||||
])
|
|
@ -12,6 +12,8 @@ ac_help=
|
|||
ac_default_prefix=/usr/local
|
||||
# Any additions from configure.in:
|
||||
ac_default_prefix=/usr
|
||||
ac_help="$ac_help
|
||||
--with-kernel=DIR Set kernel source directory [/usr/src/linux]"
|
||||
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
|
@ -601,7 +603,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
|
@ -733,13 +735,13 @@ else
|
|||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 737 "configure"
|
||||
#line 739 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -748,13 +750,13 @@ else
|
|||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 752 "configure"
|
||||
#line 754 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
|
@ -783,11 +785,11 @@ else
|
|||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 787 "configure"
|
||||
#line 789 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
{ (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
|
@ -805,7 +807,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 809 "configure"
|
||||
#line 811 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -813,7 +815,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -828,7 +830,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 832 "configure"
|
||||
#line 834 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -846,7 +848,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 850 "configure"
|
||||
#line 852 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -867,7 +869,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 871 "configure"
|
||||
#line 873 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -878,7 +880,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
{ (eval echo configure:882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
{ (eval echo configure:884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
:
|
||||
else
|
||||
|
@ -905,12 +907,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 909 "configure"
|
||||
#line 911 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -935,7 +937,6 @@ fi
|
|||
done
|
||||
|
||||
|
||||
|
||||
for ac_hdr in linux/isdn.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
|
||||
|
@ -944,12 +945,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 948 "configure"
|
||||
#line 949 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -967,16 +968,98 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`"
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
\
|
||||
{ echo "configure: error: "Missing linux/isdn.h. Kernel source installed?"" 1>&2; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
KERNELDIR=""
|
||||
lxdir="no"
|
||||
tst_kerneldir="$CONFIG_KERNELDIR"
|
||||
|
||||
# Check whether --with-kernel or --without-kernel was given.
|
||||
if test "${with_kernel+set}" = set; then
|
||||
withval="$with_kernel"
|
||||
DOTEST="y"; tst_kerneldir="${withval}"
|
||||
fi
|
||||
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" = "y" ; then
|
||||
echo $ac_n "checking for linux kernel source in ${tst_kerneldir}""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 994 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=${tst_kerneldir}
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
rm -rf conftest*
|
||||
echo "$ac_t"""no"" 1>&6
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo $ac_n "checking for linux kernel source in /usr/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1015 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
echo "$ac_t"""$lxdir"" 1>&6
|
||||
echo $ac_n "checking for linux kernel source in /usr/local/src/linux""... $ac_c" 1>&6
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1035 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <isdn_common.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
lxdir=/usr/local/src/linux
|
||||
else
|
||||
echo "$ac_err" >&5
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
echo "$ac_t"""yes"" 1>&6
|
||||
else
|
||||
lxdir=""
|
||||
{ echo "configure: error: "Kernel source not found. You MUST specify a correct path to the linux source in the configuration."" 1>&2; exit 1; }
|
||||
fi
|
||||
KERNELDIR="$lxdir"
|
||||
cat >> confdefs.h <<EOF
|
||||
#define KERNELDIR "$lxdir"
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||
|
@ -985,7 +1068,7 @@ if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
|||
else
|
||||
ac_pattern="Autoconf.*'x'"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 989 "configure"
|
||||
#line 1072 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -1003,7 +1086,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1007 "configure"
|
||||
#line 1090 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -1031,7 +1114,7 @@ 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 1035 "configure"
|
||||
#line 1118 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -1055,7 +1138,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -1079,7 +1162,6 @@ done
|
|||
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
|
@ -1213,8 +1295,8 @@ s%@CC@%$CC%g
|
|||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@CPP@%$CPP%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
s%@KERNELDIR@%$KERNELDIR%g
|
||||
s%@INSTALL@%$INSTALL%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
|
|
@ -12,13 +12,9 @@ dnl Checks for header files.
|
|||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h)
|
||||
dnl Find current kernel source
|
||||
dnl done by dereferencing the symbolic link /usr/include/linux
|
||||
dnl and then stripping off include/linux from the result.
|
||||
|
||||
AC_CHECK_HEADERS(linux/isdn.h,\
|
||||
KERNELDIR="/usr/include/`find /usr/include/linux -maxdepth 0 -printf '%l\n' | sed -e s@include/linux@@`", \
|
||||
AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
|
||||
AC_FIND_KERNEL
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
|
@ -27,5 +23,4 @@ AC_PROG_GCC_TRADITIONAL
|
|||
AC_CHECK_FUNCS(strerror)
|
||||
|
||||
AC_SUBST(INSTALL)
|
||||
AC_SUBST(KERNELDIR)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
|
|
@ -20,6 +20,7 @@ mainmenu_option next_comment
|
|||
comment 'General configuration'
|
||||
comment 'Build options'
|
||||
dep_bool 'Build programs which need X11 installed' CONFIG_BUILDX11 $CONFIG_HASX11
|
||||
string 'Kernel source directory' CONFIG_KERNELDIR
|
||||
comment 'Destination directories'
|
||||
string 'Directory to install binaries' CONFIG_BINDIR
|
||||
string 'Directory to install admin binaries' CONFIG_SBINDIR
|
||||
|
|
|
@ -11,6 +11,7 @@ CONFIG_EXPERIMENTAL=n
|
|||
# General configuration
|
||||
#
|
||||
CONFIG_BUILDX11=y
|
||||
CONFIG_KERNELDIR='/usr/src/linux'
|
||||
CONFIG_BINDIR='/usr/bin'
|
||||
CONFIG_SBINDIR='/sbin'
|
||||
CONFIG_MANDIR='/usr/man'
|
||||
|
|
Loading…
Reference in New Issue