comparison configure @ 9968:c372140a1012

mingw32 support patch by Diego Biurrun with some changes made by me
author alex
date Mon, 21 Apr 2003 21:07:35 +0000
parents 946c000ca531
children 7bd7a1aa605f
comparison
equal deleted inserted replaced
9967:b0d1b415320c 9968:c372140a1012
65 openbsd() { issystem "OpenBSD" ; return "$?" ; } 65 openbsd() { issystem "OpenBSD" ; return "$?" ; }
66 bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; } 66 bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
67 qnx() { issystem "QNX" ; return "$?" ; } 67 qnx() { issystem "QNX" ; return "$?" ; }
68 darwin() { issystem "Darwin" ; return "$?" ; } 68 darwin() { issystem "Darwin" ; return "$?" ; }
69 gnu() { issystem "GNU" ; return "$?" ; } 69 gnu() { issystem "GNU" ; return "$?" ; }
70 mingw32() { issystem "MINGW32" ; return "$?" ; }
70 71
71 # arch test boolean functions 72 # arch test boolean functions
72 # x86/x86pc is used by QNX 73 # x86/x86pc is used by QNX
73 x86() { 74 x86() {
74 case "$host_arch" in 75 case "$host_arch" in
370 HP-UX*) 371 HP-UX*)
371 system_name=HP-UX 372 system_name=HP-UX
372 ;; 373 ;;
373 [cC][yY][gG][wW][iI][nN]*) 374 [cC][yY][gG][wW][iI][nN]*)
374 system_name=CYGWIN 375 system_name=CYGWIN
376 ;;
377 MINGW32*)
378 system_name=MINGW32
375 ;; 379 ;;
376 *) 380 *)
377 system_name="$system_name-UNKNOWN" 381 system_name="$system_name-UNKNOWN"
378 ;; 382 ;;
379 esac 383 esac
1542 _vidix=no 1546 _vidix=no
1543 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?) 1547 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
1544 x86 && _vidix=yes 1548 x86 && _vidix=yes
1545 ppc && linux && _vidix=yes 1549 ppc && linux && _vidix=yes
1546 cygwin && _vidix=no 1550 cygwin && _vidix=no
1551 mingw32 && _vidix=no
1547 qnx && _vidix=no 1552 qnx && _vidix=no
1548 sunos && _vidix=no 1553 sunos && _vidix=no
1554 fi
1555
1556 if mingw32 ; then
1557 _def_stream_cache='#undef USE_STREAM_CACHE'
1558 else
1559 _def_stream_cache='#define USE_STREAM_CACHE 1'
1549 fi 1560 fi
1550 1561
1551 # On QNX we must link to libph - Gabucino 1562 # On QNX we must link to libph - Gabucino
1552 if qnx ; then 1563 if qnx ; then
1553 _ld_arch="$_ld_arch -lph" 1564 _ld_arch="$_ld_arch -lph"
1994 cat > $TMPC << EOF 2005 cat > $TMPC << EOF
1995 #include <pthread.h> 2006 #include <pthread.h>
1996 void* func(void *arg) { return arg; } 2007 void* func(void *arg) { return arg; }
1997 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } 2008 int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
1998 EOF 2009 EOF
1999 if ( cc_check && $TMPO ) ; then # QNX 2010 if mingw32 ; then
2011 _ld_pthread=''
2012 elif ( cc_check && $TMPO ) ; then # QNX
2000 _ld_pthread='' 2013 _ld_pthread=''
2001 elif ( cc_check -lpthread && $TMPO ) ; then 2014 elif ( cc_check -lpthread && $TMPO ) ; then
2002 _ld_pthread='-lpthread' 2015 _ld_pthread='-lpthread'
2003 elif ( cc_check -pthread && $TMPO ) ; then 2016 elif ( cc_check -pthread && $TMPO ) ; then
2004 _ld_pthread='-pthread' 2017 _ld_pthread='-pthread'
5023 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__" 5036 #CFLAGS="$CFLAGS -D__CYGWIN__ -D__CYGWIN_USE_BIG_TYPES__"
5024 # stat.st_size with BIG_TYPES is broken (not set) ::atmos 5037 # stat.st_size with BIG_TYPES is broken (not set) ::atmos
5025 CFLAGS="$CFLAGS -D__CYGWIN__" 5038 CFLAGS="$CFLAGS -D__CYGWIN__"
5026 else 5039 else
5027 _confcygwin="TARGET_CYGWIN = no" 5040 _confcygwin="TARGET_CYGWIN = no"
5041 fi
5042
5043 if mingw32 ; then
5044 _confmingw32='TARGET_MINGW32 = yes'
5045 else
5046 _confmingw32='TARGET_MINGW32 = no'
5028 fi 5047 fi
5029 5048
5030 # Dynamic linking flags 5049 # Dynamic linking flags
5031 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly) 5050 # (FIXME: 'echocheck "dynamic linking"' above and modify here accordingly)
5032 _ld_dl_dynamic='' 5051 _ld_dl_dynamic=''
5213 MACOSX_FRAMEWORKS = $_macosx_frameworks 5232 MACOSX_FRAMEWORKS = $_macosx_frameworks
5214 5233
5215 # --- Some stuff for autoconfigure ---- 5234 # --- Some stuff for autoconfigure ----
5216 $_target_arch 5235 $_target_arch
5217 $_confcygwin 5236 $_confcygwin
5237 $_confmingw32
5218 TARGET_CPU=$iproc 5238 TARGET_CPU=$iproc
5219 TARGET_MMX = $_mmx 5239 TARGET_MMX = $_mmx
5220 TARGET_MMX2 = $_mmx2 5240 TARGET_MMX2 = $_mmx2
5221 TARGET_3DNOW = $_3dnow 5241 TARGET_3DNOW = $_3dnow
5222 TARGET_3DNOWEX = $_3dnowex 5242 TARGET_3DNOWEX = $_3dnowex
5292 #define CONFDIR "$_confdir" 5312 #define CONFDIR "$_confdir"
5293 #define LIBDIR "$_libdir" 5313 #define LIBDIR "$_libdir"
5294 5314
5295 /* Define this to compile stream-caching support, it can be enabled via 5315 /* Define this to compile stream-caching support, it can be enabled via
5296 -cache <kilobytes> */ 5316 -cache <kilobytes> */
5297 #define USE_STREAM_CACHE 1 5317 $_def_stream_cache
5298 5318
5299 /* Define to include support for XviD/Divx4Linux/OpenDivx */ 5319 /* Define to include support for XviD/Divx4Linux/OpenDivx */
5300 $_def_divx 5320 $_def_divx
5301 5321
5302 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */ 5322 /* Define to use the new XviD/DivX4Linux library instead of open source OpenDivX */