]
)
-# Check to see if we're running under Cygwin32, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN32()
-AC_DEFUN(AM_CYGWIN32,
-[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin32=yes, am_cv_cygwin32=no)
-rm -f conftest*])
-CYGWIN32=
-test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
-
# Define a conditional.
AC_DEFUN(AM_CONDITIONAL,
dnl
dnl
dnl
+
+dnl AC_EXT_DAYLIGHT
+dnl Check for an external variable daylight. Stolen from w3c-libwww.
+AC_DEFUN(AC_EXT_DAYLIGHT,
+[ AC_MSG_CHECKING(int daylight variable)
+AC_TRY_COMPILE([#include <time.h>], [return daylight;],
+ have_daylight=yes,
+ have_daylight=no)
+AC_MSG_RESULT($have_daylight)
+])dnl
+
+dnl AC_EXT_TIMEZONE
+dnl Check for an external variable timezone. Stolen from tcl-8.0.
+AC_DEFUN(AC_EXT_TIMEZONE,
+[
+#
+# Its important to include time.h in this check, as some systems (like convex)
+# have timezone functions, etc.
+#
+have_timezone=no
+AC_MSG_CHECKING([long timezone variable])
+AC_TRY_COMPILE([#include <time.h>],
+ [extern long timezone;
+ timezone += 1;
+ exit (0);],
+ [have_timezone=yes
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+
+#
+# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+#
+if test "$have_timezone" = no; then
+ AC_MSG_CHECKING([time_t timezone variable])
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+ [have_timezone=yes
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+fi
+])dnl
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
+dnl This is needed for AC_TRY_COMPILE later
+AC_ISC_POSIX
+
dnl Check to see if this `configure' is being run in the `Cygwin32' environment
-AM_CYGWIN32
+dnl AM_CYGWIN32
+
+dnl Check for MS Windows environment
+AC_CHECK_HEADER(windows.h)
dnl Using AM_CONDITIONAL is a step out of the protected little
dnl automake fold so it is potentially dangerous. But, we are
dnl enough. AM_CONDITIONALS are then referenced to conditionally
dnl build a Makefile.in from a Makefile.am which lets us define custom
dnl includes, compile alternative source files, etc.
-dnl Check for Linux style audio support
-AM_CONDITIONAL(HAVE_DAYLIGHT, grep daylight /usr/include/time.h )
+dnl Check for external variables daylight and timezone.
+AC_EXT_DAYLIGHT
+AM_CONDITIONAL(HAVE_DAYLIGHT, test "$have_daylight" = yes )
-AM_CONDITIONAL(HAVE_TIMEZONE, grep timezone /usr/include/time.h )
+AC_EXT_TIMEZONE
+AM_CONDITIONAL(HAVE_TIMEZONE, test "$have_timezone" = yes )
-AM_CONDITIONAL(HAVE_OSS_AUDIO, \
- test -r /usr/include/soundcard.h -o -r /usr/include/linux/soundcard.h )
+dnl Check for Linux style audio support
+AM_CONDITIONAL(HAVE_AUDIO_SUPPORT, \
+ test -r /usr/include/soundcard.h \
+ -o -r /usr/include/linux/soundcard.h \
+ -o -r /usr/include/machine/soundcard.h \
+ -o "x$ac_cv_header_windows_h" = "xyes" )
-AC_CHECK_HEADER(windows.h)
+AM_CONDITIONAL(HAVE_WIN32_AUDIO, test "x$ac_cv_header_windows_h" = "xyes")
dnl extra library and include directories
EXTRA_DIRS="/usr/local /usr/X11R6 /opt/X11R6"
Include/Makefile \
Lib/Makefile \
Lib/Audio/Makefile \
+ Lib/Audio/src/Makefile \
+ Lib/Audio/example/Makefile \
Lib/Bucket/Makefile \
Lib/Debug/Makefile \
Lib/DEM/Makefile \