mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-08 00:41:01 +00:00
Okay, WildCode, check this.
This commit is contained in:
parent
b0dc19310a
commit
edea800aeb
1 changed files with 69 additions and 61 deletions
130
configure.ac
130
configure.ac
|
@ -42,31 +42,34 @@ endian=""
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw32*)
|
mingw32*)
|
||||||
mingw=yes
|
mingw=yes
|
||||||
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/win32"
|
||||||
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/win32/resources"
|
||||||
if test $host != $build; then
|
if test "$host" != "$build"; then
|
||||||
CC=$host_cpu-$host_os-gcc
|
CC="$host_cpu-$host_os-gcc"
|
||||||
AS=$host_cpu-$host_os-gcc
|
AS="$CC"
|
||||||
AR=$host_cpu-$host_os-ar
|
AR="$host_cpu-$host_os-ar"
|
||||||
RANLIB=$host_cpu-$host_os-ranlib
|
RANLIB="$host_cpu-$host_os-ranlib"
|
||||||
endian="little"
|
endian="little"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
cygwin*)
|
cygwin*)
|
||||||
cygwin=yes
|
cygwin=yes
|
||||||
CPPFLAGS="$CPPFLAGS -mwindows -mno-cygwin"
|
if test "$host" != "$build"; then
|
||||||
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32"
|
CC="$host_cpu-$host_os-gcc"
|
||||||
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources"
|
AS="$CC"
|
||||||
if test $host != $build; then
|
AR="$host_cpu_$host_os-ar"
|
||||||
CC=$host_cpu-$host_os-gcc
|
RANLIB="$host_cpu-$host_os-ranlib"
|
||||||
AS=$host_cpu-$host_os-gcc
|
case "$target" in
|
||||||
AR=$host_cpu_$host_os-ar
|
*mingw32)
|
||||||
RANLIB=$host_cpu-$host_os-ranlib
|
mingw=yes
|
||||||
endian="little"
|
CFLAGS="$CFLAGS -mno-cygwin -mwindows"
|
||||||
fi
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/win32"
|
||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/win32/resources"
|
||||||
LDFLAGS="$LDFLAGS -lSDL -mwindows -mno-cygwin"
|
endian="little"
|
||||||
;;
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl ==================================================================
|
dnl ==================================================================
|
||||||
|
@ -552,18 +555,18 @@ dnl ==================================================================
|
||||||
dnl Checks for which system driver to use
|
dnl Checks for which system driver to use
|
||||||
AC_MSG_CHECKING(for system driver)
|
AC_MSG_CHECKING(for system driver)
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
i?86-*-mingw32*)
|
i?86-*-mingw32*)
|
||||||
SYSTYPE=WIN32
|
SYSTYPE=WIN32
|
||||||
AC_MSG_RESULT([Win32 driver])
|
AC_MSG_RESULT([Win32 driver])
|
||||||
;;
|
;;
|
||||||
i?86-*-cygwin*)
|
i?86-*-cygwin*)
|
||||||
SYSTYPE=WIN32
|
SYSTYPE=WIN32
|
||||||
AC_MSG_RESULT([Win32 driver])
|
AC_MSG_RESULT([Win32 driver])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
SYSTYPE=POSIX
|
SYSTYPE=POSIX
|
||||||
AC_MSG_RESULT([default POSIX driver])
|
AC_MSG_RESULT([default POSIX driver])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(SYSTYPE_WIN32, test "$SYSTYPE" = "WIN32")
|
AM_CONDITIONAL(SYSTYPE_WIN32, test "$SYSTYPE" = "WIN32")
|
||||||
|
|
||||||
|
@ -595,7 +598,7 @@ AC_ARG_ENABLE(alsa,
|
||||||
[ --disable-alsa disable checks for ALSA support])
|
[ --disable-alsa disable checks for ALSA support])
|
||||||
|
|
||||||
AC_ARG_ENABLE(oss,
|
AC_ARG_ENABLE(oss,
|
||||||
[ --disable-oss disable checks for OSS support])
|
[ --disable-oss disable checks for OSS support])
|
||||||
|
|
||||||
AC_ARG_ENABLE(sound,
|
AC_ARG_ENABLE(sound,
|
||||||
[ --disable-sound disable sound outright])
|
[ --disable-sound disable sound outright])
|
||||||
|
@ -607,30 +610,30 @@ HAVE_ALSA=no
|
||||||
if test "x$enable_alsa" != "xno"; then
|
if test "x$enable_alsa" != "xno"; then
|
||||||
if test "x$ac_cv_header_sys_asoundlib_h" = "xyes" -o \
|
if test "x$ac_cv_header_sys_asoundlib_h" = "xyes" -o \
|
||||||
"x$ac_cv_header_alsa_asoundlib_h" = "xyes"; then
|
"x$ac_cv_header_alsa_asoundlib_h" = "xyes"; then
|
||||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||||
[
|
[
|
||||||
#include <sys/asoundlib.h>
|
#include <sys/asoundlib.h>
|
||||||
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
|
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
|
||||||
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR == 5)
|
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR == 5)
|
||||||
QF_maGiC_VALUE
|
QF_maGiC_VALUE
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
SOUND_TYPES="$SOUND_TYPES ALSA0.5"
|
SOUND_TYPES="$SOUND_TYPES ALSA0.5"
|
||||||
ALSA_LIBS="-lasound"
|
ALSA_LIBS="-lasound"
|
||||||
HAVE_ALSA=yes,
|
HAVE_ALSA=yes,
|
||||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||||
[
|
[
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
|
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
|
||||||
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9)
|
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9)
|
||||||
QF_maGiC_VALUE
|
QF_maGiC_VALUE
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
SOUND_TYPES="$SOUND_TYPES ALSA0.9"
|
SOUND_TYPES="$SOUND_TYPES ALSA0.9"
|
||||||
ALSA_LIBS="-lasound"
|
ALSA_LIBS="-lasound"
|
||||||
HAVE_ALSA=yes,
|
HAVE_ALSA=yes,
|
||||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||||
[
|
[
|
||||||
#include <sys/asoundlib.h>
|
#include <sys/asoundlib.h>
|
||||||
|
@ -670,7 +673,7 @@ AC_SUBST(MME_LIBS)
|
||||||
dnl OSS
|
dnl OSS
|
||||||
HAVE_OSS=no
|
HAVE_OSS=no
|
||||||
if test "x$enable_oss" != "xno"; then
|
if test "x$enable_oss" != "xno"; then
|
||||||
if test "x$ac_cv_header_sys_soundcard_h" = "xyes" -o \
|
if test "x$ac_cv_header_sys_soundcard_h" = "xyes" -o \
|
||||||
"x$ac_cv_header_machine_soundcard_h" = "xyes" -o \
|
"x$ac_cv_header_machine_soundcard_h" = "xyes" -o \
|
||||||
"x$ac_cv_header_linux_soundcard_h" = "xyes"; then
|
"x$ac_cv_header_linux_soundcard_h" = "xyes"; then
|
||||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||||
|
@ -886,7 +889,8 @@ SAVELIBS="$LIBS"
|
||||||
LIBS="$LIBS -lwsock32"
|
LIBS="$LIBS -lwsock32"
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
],[
|
],
|
||||||
|
[
|
||||||
connect(0, NULL, 42);
|
connect(0, NULL, 42);
|
||||||
],
|
],
|
||||||
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
||||||
|
@ -912,9 +916,10 @@ if test "x$ac_cv_func_connect" != "xyes"; then
|
||||||
LIBS="$LIBS -lwsock32"
|
LIBS="$LIBS -lwsock32"
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
],[
|
],
|
||||||
connect(0, NULL, 42);
|
[
|
||||||
],
|
connect (0, NULL, 42);
|
||||||
|
],
|
||||||
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
||||||
AC_MSG_RESULT(yes),
|
AC_MSG_RESULT(yes),
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
@ -937,10 +942,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set
|
dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set
|
||||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
|
||||||
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
|
test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"
|
||||||
|
|
||||||
if test "x$SYSTYPE" = xWIN32; then
|
if test "x$SYSTYPE" = "xWIN32"; then
|
||||||
default_globalconf="~/${PACKAGE}.conf"
|
default_globalconf="~/${PACKAGE}.conf"
|
||||||
default_userconf="~/${PACKAGE}rc"
|
default_userconf="~/${PACKAGE}rc"
|
||||||
default_sharepath="."
|
default_sharepath="."
|
||||||
|
@ -1016,7 +1021,6 @@ AC_SUBST(plugindir)
|
||||||
AC_SUBST(PLUGINDIR)
|
AC_SUBST(PLUGINDIR)
|
||||||
|
|
||||||
dnl CFLAGS for release and devel versions
|
dnl CFLAGS for release and devel versions
|
||||||
CFLAGS=""
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[ --disable-debug compile without debugging],
|
[ --disable-debug compile without debugging],
|
||||||
debug=$enable_debug
|
debug=$enable_debug
|
||||||
|
@ -1037,8 +1041,8 @@ AC_ARG_ENABLE(optimize,
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_ENABLE(typecheck-progs,
|
AC_ARG_ENABLE(typecheck-progs,
|
||||||
[ --disable-typecheck-progs disable type checking on progs field access])
|
[ --enable-typecheck-progs Enable type checking on progs field access])
|
||||||
if test "x$enable_typecheck_progs" $cvs_def_enabled; then
|
if test "x$enable_typecheck_progs" = xyes; then
|
||||||
AC_DEFINE(TYPECHECK_PROGS)
|
AC_DEFINE(TYPECHECK_PROGS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1084,7 +1088,6 @@ if test "x$optimize" = xyes; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
CFLAGS="$CFLAGS "
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl CFLAGS for release and devel versions
|
dnl CFLAGS for release and devel versions
|
||||||
|
@ -1108,8 +1111,13 @@ if test "x$GCC" = xyes; then
|
||||||
AC_MSG_CHECKING(for -pipe vs -save-temps)
|
AC_MSG_CHECKING(for -pipe vs -save-temps)
|
||||||
AC_ARG_ENABLE(save-temps,
|
AC_ARG_ENABLE(save-temps,
|
||||||
[ --enable-save-temps save temporary files],
|
[ --enable-save-temps save temporary files],
|
||||||
AC_MSG_RESULT(-save-temps); CFLAGS="$CFLAGS -save-temps"; BUILD_TYPE="$BUILD_TYPE Save-temps",
|
AC_MSG_RESULT(-save-temps)
|
||||||
AC_MSG_RESULT(-pipe); check_pipe=yes)
|
CFLAGS="$CFLAGS -save-temps"
|
||||||
|
BUILD_TYPE="$BUILD_TYPE Save-temps"
|
||||||
|
,
|
||||||
|
AC_MSG_RESULT(-pipe)
|
||||||
|
check_pipe=yes
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
if test "x$check_pipe" = xyes; then
|
if test "x$check_pipe" = xyes; then
|
||||||
AC_MSG_CHECKING(whether -pipe works)
|
AC_MSG_CHECKING(whether -pipe works)
|
||||||
|
|
Loading…
Reference in a new issue