freebsd-ports/emulators/snes9x/files/patch-configure
Pav Lucistnik 0c435188db - Fill in $LINENO in configure script, so it detects FreeBSD, so it enables
joystick support.

  This a more magic situation.

PR:		ports/96193
Submitted by:	Andreas Steinel <lnxbil@saarlinux.org>
2006-04-29 21:40:22 +00:00

122 lines
3.5 KiB
Text

--- configure.orig Thu Dec 4 18:03:08 2003
+++ configure Sat Apr 29 23:35:05 2006
@@ -646,6 +646,7 @@
--with(out)-aido Use a shared memory area for output (default: without)
--with(out)-joystick Enable joystick support if available (default: with)
--with(out)-assembler Use assembler cores if available (default: with)
+ --with(out)-mmx Use mmx assembly code (default: with)
--with(out)-sdd1-decomp Use SDD1 decompression (default: with)
--with(out)-screenshot Screenshot support through libpng if available (default: with)
--with-x use the X Window System
@@ -1992,6 +1993,14 @@
with_assembler=yes
fi;
+# Check whether --with-mmx or --without-mmx was given.
+if test "${with_mmx+set}" = set -a yes = "$with_assembler"; then
+ withval="$with_mmx"
+
+else
+ with_mmx=no
+fi;
+
# Check whether --with-sdd1-decomp or --without-sdd1-decomp was given.
if test "${with_sdd1_decomp+set}" = set; then
withval="$with_sdd1_decomp"
@@ -3866,6 +3875,59 @@
echo "$as_me:3866: result: $snes9x_cv_hpux_os" >&5
echo "${ECHO_T}$snes9x_cv_hpux_os" >&6
+echo "$as_me:$LINENO: checking if the OS is FreeBSD" >&5
+echo $ECHO_N "checking if the OS is FreeBSD... $ECHO_C" >&6
+if test "${snes9x_cv_freebsd_os+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3885 "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __FreeBSD__
+/* */
+#else
+#error Not FreeBSD.
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ snes9x_cv_freebsd_os=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+snes9x_cv_freebsd_os=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $snes9x_cv_freebsd_os" >&5
+echo "${ECHO_T}$snes9x_cv_freebsd_os" >&6
+
echo "$as_me:3869: checking if the OS is MS Windows" >&5
echo $ECHO_N "checking if the OS is MS Windows... $ECHO_C" >&6
if test "${snes9x_cv_win32_os+set}" = set; then
@@ -3970,7 +4032,9 @@
ZSNESFX='ZSNESFX=1'
ZSNESC4='ZSNESC4=1'
ASMCPU='ASMCPU=1'
+if test yes = "$with_mmx"; then
ASMKREED='ASMKREED=1'
+fi
# SPC700ASM='SPC700ASM=1'
I386SPC='i386/SPC.O'
CPUINC='-Ii386'
@@ -3985,6 +4049,9 @@
if test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then
JOYDEFINES=' -DJOYSTICK_SUPPORT'
+elif test yes = "$snes9x_cv_freebsd_os" -a yes = "$with_joystick"; then
+ JOYDEFINES=' -DJOYSTICK_SUPPORT'
+ SYSLIBS="$SYSLIBS"' -lusbhid'
else
with_joystick="no"
fi
@@ -5141,7 +5208,7 @@
#line 5141 "configure"
#include "confdefs.h"
-#if defined(__linux) || defined(__sun) || defined(__sgi)
+#if defined(__linux) || defined(__sun) || defined(__sgi) || defined(__FreeBSD__)
/* */
#else
#error No sound for this platform
@@ -5320,6 +5387,7 @@
display system.... $snes9x_info_display
joystick support.. $with_joystick
using asm cores... $with_assembler
+using mmx code.... $with_mmx
SDD1 decompession. $with_sdd1_decomp
debugger.......... $with_debugger