1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(mikdos/mirq.c)
AC_CONFIG_HEADER(aconfig.h)
use_cc_g_flag=no
CCOPTS="$CFLAGS"
AC_PROG_CC
CFLAGS="$CCOPTS"
AC_PROG_INSTALL
AC_CHECK_PROG(system,uname,`uname`,unknown)
if test "x$system" = xLinux; then
AC_CHECK_PROG(machine,uname,`uname --machine`,unknown)
fi
AC_HEADER_STDC
AC_CHECK_LIB(gpm, Gpm_Repeat)
AC_CHECK_LIB(m, pow)
AC_CHECK_LIB(ncurses, initscr)
AC_CHECK_LIB(curses, initscr)
dnl
dnl This part supplies reasonable defaults for CFLAGS, if they weren't
dnl specified by ''CFLAGS=flags ./configure''
dnl
cc_uses_g=yes
if test x$GCC = xyes; then
if test x$ac_cv_prog_gcc_g = xyes; then
:
else
cc_uses_g=no
fi
fi
if test "x$CCOPTS" = x; then
if test x$GCC = xyes; then
if test x$machine = xi486; then
mflag=486
fi
if test x$machine = xi586; then
mflag=486
fi
if test x$mflag = x486; then
CCOPTS='-O6 -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -fforce-mem -fforce-addr -funroll-loops'
if test x$use_cc_g_flag = xyes; then
if test $cc_uses_g = yes; then
CCOPTS='-m486 -g -O'
fi
fi
else
CCOPTS='-O2 -fstrength-reduce -ffast-math -fforce-mem -fforce-addr -funroll-loops'
if test x$use_cc_g_flag = xyes; then
if test $cc_uses_g = yes; then
CCOPTS='-g -O'
fi
fi
fi
else
if test x$use_cc_g_flag = xyes; then
CCOPTS="$CFLAGS"
else
CCOPTS=
fi
fi
fi
CFLAGS="$CCOPTS"
CFLAGS=${CFLAGS--O}
LDFLAGS=${LDFLAGS--O}
search_aalib=true
AC_DEFUN(AC_AALIB, [
if $search_aalib
then
if test -f $1/aalib.h
then
LIBS1="$LIBS"
LIBS="$LIBS $2"
unset ac_cv_lib_aa_aa_init
AC_CHECK_LIB(aa, aa_init)
if test "x$ac_cv_lib_aa_aa_init" = xyes; then
AC_MSG_RESULT(Found aalib on $1/aalib.h)
LIBS="$LIBS $2"
CFLAGS="$CFLAGS $3"
search_aalib=false
else
unset ac_cv_lib_aa_aa_init
LIBS="$LIBS1"
fi
fi
fi
])
dnl Checks for programs.
AC_PROG_MAKE_SET
dnl Checks for libraries.
AC_PATH_X
AC_PATH_XTRA
if test "x$no_x" = x; then
LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
CFLAGS="$CFLAGS $X_CFLAGS"
fi
AC_AALIB(/usr/include, , )
AC_AALIB(/usr/local/include, -L/usr/local/lib, -I/usr/local/include)
for name in ../aalib-*.*
do
AC_AALIB($name,"-L$name","-I$name")
done
if $search_aalib
then
echo "--------------------------------------------------------"
echo "Library AA-lib is required for BB!"
echo "Please download it from ftp.ta.jcu.cz:/pub/aa"
echo "Install AA-lib into /usr/local/.. tree or just compile in same"
echo "directory as bb"
exit
fi
fi
dnl Replace `main' with a function in -lslang:
AC_CHECK_LIB(slang, SLsmg_init_smg)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(ftime gettimeofday select strdup strstr strtol)
AC_OUTPUT(makefile)
|