mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-18 01:21:39 +00:00
Check for for connect in -lwsock32
Replaced {target} with {host}. Fixed up system driver selection.
This commit is contained in:
parent
e5a8b1dfab
commit
4792d2354b
1 changed files with 59 additions and 29 deletions
88
configure.in
88
configure.in
|
@ -33,19 +33,31 @@ AC_SUBST(ISODATE)
|
||||||
|
|
||||||
AC_LANG_C
|
AC_LANG_C
|
||||||
|
|
||||||
|
|
||||||
|
dnl ==================================================================
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
AC_PROG_AWK
|
AC_PROG_AWK
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
|
||||||
|
dnl ==================================================================
|
||||||
dnl Checks for system services
|
dnl Checks for system services
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
AC_SYS_LONG_FILE_NAMES
|
AC_SYS_LONG_FILE_NAMES
|
||||||
AC_EXEEXT
|
AC_EXEEXT
|
||||||
AC_OBJEXT
|
AC_OBJEXT
|
||||||
|
|
||||||
|
|
||||||
|
dnl ==================================================================
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_HEADER_MAJOR
|
AC_HEADER_MAJOR
|
||||||
|
@ -62,7 +74,11 @@ AC_CHECK_HEADERS(
|
||||||
mgraph.h
|
mgraph.h
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
|
dnl ==================================================================
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
@ -130,7 +146,10 @@ AC_TRY_COMPILE(
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dnl ==================================================================
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
AC_FUNC_MEMCMP
|
AC_FUNC_MEMCMP
|
||||||
AC_FUNC_MMAP
|
AC_FUNC_MMAP
|
||||||
|
@ -359,6 +378,29 @@ fi
|
||||||
AC_SUBST(GLX_CFLAGS)
|
AC_SUBST(GLX_CFLAGS)
|
||||||
AC_SUBST(GLX_LIBS)
|
AC_SUBST(GLX_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
NET_LIBS=""
|
||||||
|
if test "x$ac_cv_func_connect" != "xyes"; then
|
||||||
|
AC_MSG_CHECKING([for connect in -lwsock32])
|
||||||
|
SAVELIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lwsock32"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <winsock.h>
|
||||||
|
],[
|
||||||
|
connect(0, NULL, 42);
|
||||||
|
],
|
||||||
|
NET_LIBS="$NET_LIBS -lwsock32 -lwinmm"
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no))
|
||||||
|
LIBS="$SAVELIBS"
|
||||||
|
fi
|
||||||
|
AC_SUBST(NET_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
dnl ==================================================================
|
||||||
|
dnl Misc checks
|
||||||
|
dnl ==================================================================
|
||||||
|
|
||||||
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}'
|
||||||
|
@ -429,7 +471,7 @@ if test "x$RELEASE" = xyes; then
|
||||||
CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
AC_MSG_CHECKING(for special release compiler settings)
|
AC_MSG_CHECKING(for special release compiler settings)
|
||||||
case "${target}" in
|
case "${host}" in
|
||||||
i?86-*-*)
|
i?86-*-*)
|
||||||
MORE_CFLAGS="-malign-loops=4 -malign-jumps=4 -malign-functions=4"
|
MORE_CFLAGS="-malign-loops=4 -malign-jumps=4 -malign-functions=4"
|
||||||
;;
|
;;
|
||||||
|
@ -453,7 +495,7 @@ dnl problems with any compiler that is ANSI/ISO-C compliant.
|
||||||
dnl Make the compiler swallow its pride...
|
dnl Make the compiler swallow its pride...
|
||||||
if test "x$GCC" != xyes; then
|
if test "x$GCC" != xyes; then
|
||||||
AC_MSG_CHECKING(for how to deal with C++ comments)
|
AC_MSG_CHECKING(for how to deal with C++ comments)
|
||||||
case "$target" in
|
case "${host}" in
|
||||||
*-aix*)
|
*-aix*)
|
||||||
CFLAGS="$CFLAGS -qcpluscmt"
|
CFLAGS="$CFLAGS -qcpluscmt"
|
||||||
AC_MSG_RESULT([-qcpluscmt])
|
AC_MSG_RESULT([-qcpluscmt])
|
||||||
|
@ -480,7 +522,7 @@ fi
|
||||||
|
|
||||||
dnl Check for ia32
|
dnl Check for ia32
|
||||||
AC_MSG_CHECKING(for an ia32 machine)
|
AC_MSG_CHECKING(for an ia32 machine)
|
||||||
case "${target}" in
|
case "${host}" in
|
||||||
i?86-*-*)
|
i?86-*-*)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_MSG_CHECKING(to see if we should disable asm optimizations)
|
AC_MSG_CHECKING(to see if we should disable asm optimizations)
|
||||||
|
@ -498,34 +540,22 @@ AC_SUBST(ASM_ARCH)
|
||||||
|
|
||||||
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 "${target}" in
|
case "${host}" in
|
||||||
*-*-linux-gnu*)
|
|
||||||
CL_SYS_SRC="sys_linux.c"
|
|
||||||
SV_SYS_SRC="sys_unix.c"
|
|
||||||
;;
|
|
||||||
i?86-*-mingw32*)
|
i?86-*-mingw32*)
|
||||||
CL_SYS_SRC="sys_win.c"
|
SYSTYPE=WIN32
|
||||||
SV_SYS_SRC="sys_win.c"
|
AC_MSG_RESULT([Win32 driver])
|
||||||
;;
|
;;
|
||||||
i?86-*-*djgpp* | i?86-*-*msdos*)
|
|
||||||
# XXX - dos - conproc.c(?) sys_dos.c
|
|
||||||
# XXX - need to add dos
|
|
||||||
CL_SYS_SRC=""
|
|
||||||
SV_SYS_SRC=""
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
CL_SYS_SRC="sys_linux.c"
|
SYSTYPE=POSIX
|
||||||
SV_SYS_SRC="sys_unix.c"
|
AC_MSG_RESULT([default POSIX driver])
|
||||||
DEFAULT_SYS=yes
|
;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
if test "x$DEFAULT_SYS" = xyes; then
|
AM_CONDITIONAL(SYSTYPE_WIN32, test "$SYSTYPE" = "WIN32")
|
||||||
AC_MSG_RESULT([no, using default])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(yes ($CL_SYS_SRC $SV_SYS_SRC))
|
dnl ==================================================================
|
||||||
fi
|
dnl Find out what to build and finish
|
||||||
AC_SUBST(CL_SYS_SRC)
|
dnl ==================================================================
|
||||||
AC_SUBST(SV_SYS_SRC)
|
|
||||||
|
|
||||||
if test "x$HAVE_SVGA" = xyes; then
|
if test "x$HAVE_SVGA" = xyes; then
|
||||||
TARGETS="$TARGETS qf-client-svga\$(EXEEXT)"
|
TARGETS="$TARGETS qf-client-svga\$(EXEEXT)"
|
||||||
|
|
Loading…
Reference in a new issue