--- pulseaudio-0.9.5-orig/configure.ac 2006-08-27 05:22:17.000000000 +1000 +++ pulseaudio-0.9.5/configure.ac 2006-12-18 01:55:25.378750000 +1000 @@ -122,15 +122,35 @@ #### Determine build environment #### os_is_win32=0 +cygwin=0 case "$host_os" in mingw*) AC_DEFINE([OS_IS_WIN32], 1, [Build target is Windows.]) os_is_win32=1 ;; + cygwin*) + # Build for cygwin environment + # Note this also allows HAVE_X11 and disables HAVE_OSS + # since we have Cygwin/X and WaveOut under Cygwin + AC_ARG_ENABLE([cygwin], AC_HELP_STRING([--disable-cygwin], [Allow win32api under Cygwin]), + [ + case "${enableval}" in + yes) cygwin=1 ;; + no) cygwin=0 ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-cygwin) ;; + esac + ], + [cygwin=1]) + os_is_win32=1 esac +if test "x${cygwin}" != "x1" ; then + AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h]) +fi + AM_CONDITIONAL(OS_IS_WIN32, test "x$os_is_win32" = "x1") +AM_CONDITIONAL(OS_IS_CYGWIN, test "x$cygwin" = "x1") ################################### # Basic environment checks # @@ -165,9 +185,6 @@ # Solaris AC_CHECK_HEADERS([sys/filio.h]) -# Windows -AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h]) - # Other AC_CHECK_HEADERS([sys/ioctl.h]) @@ -266,7 +283,7 @@ HAVE_X11=0 # The macro tests the host, not the build target -if test "x$os_is_win32" != "x1" ; then +if test "x$os_is_win32" != "x1" -o "x$cygwin" == "x1" ; then AC_PATH_XTRA test "x$no_x" != "xyes" && HAVE_X11=1 fi @@ -333,7 +350,7 @@ ], [oss=auto]) -if test "x${oss}" != xno ; then +if test "x${oss}" != xno -a "x${cygwin}" != "x1" ; then AC_CHECK_HEADERS([sys/soundcard.h], [ HAVE_OSS=1 --- pulseaudio-0.9.5-orig/src/Makefile.am 2006-08-19 05:56:48.000000000 +1000 +++ pulseaudio-0.9.5/src/Makefile.am 2006-12-18 02:22:13.327500000 +1000 @@ -33,7 +33,11 @@ PA_BINARY=$(bindir)/pulseaudio$(EXEEXT) if OS_IS_WIN32 +if OS_IS_CYGWIN +PA_DEFAULT_CONFIG_DIR=$(pulseconfdir) +else PA_DEFAULT_CONFIG_DIR=%PULSE_ROOT% +endif else PA_DEFAULT_CONFIG_DIR=$(pulseconfdir) endif @@ -66,8 +70,10 @@ if OS_IS_WIN32 AM_LDFLAGS+=-Wl,--export-all-symbols +if !OS_IS_CYGWIN WINSOCK_LIBS=-lwsock32 -lws2_32 -lwininet endif +endif ################################### # Extra files # @@ -424,9 +430,11 @@ pulsecore/shm.c pulsecore/shm.h if OS_IS_WIN32 +if !OS_IS_CYGWIN libpulse_la_SOURCES += \ pulsecore/dllmain.c endif +endif if HAVE_X11 libpulse_la_SOURCES += \ @@ -598,9 +606,11 @@ pulsecore/shm.c pulsecore/shm.h if OS_IS_WIN32 +if !OS_IS_CYGWIN libpulsecore_la_SOURCES += \ pulsecore/dllmain.c endif +endif libpulsecore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS) libpulsecore_la_LDFLAGS = -version-info $(LIBPULSECORE_VERSION_INFO) @@ -1105,7 +1115,7 @@ module_x11_publish_la_SOURCES = modules/module-x11-publish.c module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) module_x11_publish_la_LDFLAGS = -module -avoid-version -module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauthkey-prop.la libx11prop.la libstrlist.la +module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIBS) libx11wrap.la libauthkey.la libauthkey-prop.la libx11prop.la libstrlist.la libpulsecore.la # OSS