AC_INIT(cpmfs.c)
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
-VERSION=2.10
-UPDATED='July 6, 2009'
+VERSION=2.20
+UPDATED='October 25, 2014'
DEVICE="posix"
case $host in
*-linux-*)
;;
+ *-pc-mingw32)
+ CFLAGS_LIBDSK=-DNOTWINDLL
+ ;;
esac
fi
if test "$GCC" = yes
then
- 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"
+ CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wextra -Wno-unused-parameter -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"
LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g"
else
CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}"
AC_CHECK_LIB(curses, printw, FSED_CPM=fsed.cpm LIBS="-lcurses $LIBS", FSED_CPM=)
if test x"$FSED_CPM" = x""; then
AC_CHECK_LIB(ncurses, printw, FSED_CPM=fsed.cpm LIBS="-lncurses $LIBS", FSED_CPM=)
+ if test x"$FSED_CPM" != x""; then
+ AC_DEFINE(NEED_NCURSES)
+ AC_CHECK_HEADERS(ncurses/ncurses.h,have_ncurses_ncurses_h=yes)
+ fi
fi
dnl If using libdsk, check it's available.
if test "$LIBDSK" != ""; then
DEVICE="libdsk"
CPPFLAGS="$CPPFLAGS -I$LIBDSK/include"
- CFLAGS="$CFLAGS -I$LIBDSK/include"
+ CFLAGS="$CFLAGS -I$LIBDSK/include $CFLAGS_LIBDSK"
LDFLAGS="$LDFLAGS -L$LIBDSK/lib"
AC_CHECK_LIB(dsk, dsk_open)
AC_CHECK_HEADERS(libdsk.h, ,[echo "No libdsk.h - aborting"; exit 1])
dnl If using win32, check it's available.
if test x"$DEVICE" = x"win32"; then
- AC_CHECK_HEADERS(windows.h winioctl.h, ,[echo "Windows headers not found - aborting"; exit 1] )
+ AC_CHECK_HEADERS(windows.h, ,[echo "Device win32, but <windows.h> not found - aborting"; exit 1] )
+ AC_CHECK_HEADERS(winioctl.h, ,[echo "Device win32, but <winioctl.h> not found - aborting"; exit 1],
+[#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+])
fi
dnl Checks for header files.