2 AC_CONFIG_HEADER(config.h)
5 UPDATED='November 26, 2007'
9 if test "$prefix" = NONE
23 CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common"
24 LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g"
26 CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
27 LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
30 AC_ARG_WITH(defformat,[ --with-defformat Specify default format (ibm-3740)],
31 [DEFFORMAT="$withval"], [DEFFORMAT="ibm-3740"])
32 AC_ARG_WITH(libdsk, [ --with-libdsk Specify path to libdsk library],
33 [LIBDSK="$withval"], [LIBDSK=""])
34 AC_ARG_WITH(dmalloc, [ --with-dmalloc Specify path to dmalloc library],
35 [CPPFLAGS="$CPPFLAGS -I$with_dmalloc/include"
36 LDFLAGS="$LDFLAGS -L$with_dmalloc/lib"
37 LIBS="$LIBS -ldmalloc"
38 AC_DEFINE(USE_DMALLOC)])
42 dnl Choose between posix and win32 drivers...
45 if test "$CYGWIN" = "yes"
49 if test "$MINGW32" = "yes"
55 dnl Check for curses. If not found, don't build fsed.cpm
56 dnl Try both curses and ncurses
57 AC_CHECK_LIB(curses, printw, FSED_CPM=fsed.cpm LIBS="-lcurses $LIBS", FSED_CPM=)
58 if test x"$FSED_CPM" = x""; then
59 AC_CHECK_LIB(ncurses, printw, FSED_CPM=fsed.cpm LIBS="-lncurses $LIBS", FSED_CPM=)
62 dnl If using libdsk, check it's available.
63 if test "$LIBDSK" != ""; then
65 CPPFLAGS="$CPPFLAGS -I$LIBDSK/include"
66 CFLAGS="$CFLAGS -I$LIBDSK/include"
67 LDFLAGS="$LDFLAGS -L$LIBDSK/lib"
68 AC_CHECK_LIB(dsk, dsk_open)
69 AC_CHECK_HEADERS(libdsk.h, ,[echo "No libdsk.h - aborting"; exit 1])
72 dnl If using win32, check it's available.
73 if test x"$DEVICE" = x"win32"; then
74 AC_CHECK_HEADERS(windows.h winioctl.h, ,[echo "Windows headers not found - aborting"; exit 1] )
77 dnl Checks for header files.
79 AC_CHECK_HEADERS(fcntl.h sys/types.h sys/stat.h limits.h unistd.h)
81 dnl Checks for typedefs, structures, and compiler characteristics.
92 dnl add EXE extension to fsed.cpm
93 if test x"$FSED_CPM" != x""; then
94 FSED_CPM="$FSED_CPM$EXEEXT"
97 dnl Checks for library functions.
100 AC_CHECK_FUNCS(mktime strerror)
105 eval DATADIR=$datadir
111 AC_OUTPUT(Makefile cpm.5 cpmchattr.1 cpmchmod.1 cpmcp.1 cpmls.1 cpmrm.1 fsck.cpm.1 fsed.cpm.1 mkfs.cpm.1 )