Changes to build under Solaris, AIX, Irix, & Linux.

acconfig.h - USE_INTEL_ASM removed (not needed in .h), added stricmp
configure.in - added AC_C_BIGENDIAN, got rid of bootstrap warning, fixed
socklen_t code, fixed asm code, added sun sound code, update NET_LIBS
properly
This commit is contained in:
Loring Holden 2000-05-25 06:23:42 +00:00
parent 8005c0d25e
commit 3ea246dd56
2 changed files with 58 additions and 9 deletions

View file

@ -31,9 +31,6 @@
/* Define this to use experimental code */ /* Define this to use experimental code */
#undef _EXPERIMENTAL_ #undef _EXPERIMENTAL_
/* Define this if you want to use Intel assembly optimizations */
#undef USE_INTEL_ASM
/* Define this if you have a Linux-style CD-ROM API */ /* Define this if you have a Linux-style CD-ROM API */
#undef USE_LINUX_CD #undef USE_LINUX_CD
@ -85,5 +82,8 @@
/* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY */ /* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY */
#undef GLAPIENTRY #undef GLAPIENTRY
/* Define this to something sane if you don't have stricmp */
#undef stricmp
@BOTTOM@ @BOTTOM@
#endif // _CONFIG_H #endif // _CONFIG_H

View file

@ -78,17 +78,22 @@ dnl ==================================================================
dnl Checks for typedefs, structures, and compiler characteristics dnl Checks for typedefs, structures, and compiler characteristics
dnl ================================================================== dnl ==================================================================
dnl call AC_PROG_CC_CONST before AC_C_CONST to avoid warnings
AC_PROG_CC_STDC
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME AC_HEADER_TIME
AC_STRUCT_TM AC_STRUCT_TM
AC_C_BIGENDIAN
AC_TRY_COMPILE( AC_TRY_COMPILE(
[#include <sys/types.h>], [#include <sys/types.h>],
[ socklen_t x = 0;], [ socklen_t x = 0;],
AC_DEFINE(HAVE_SOCKLEN_T) AC_DEFINE(HAVE_SOCKLEN_T) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
dnl FreeBSD 4.0 has it in sys/socket.h dnl FreeBSD 4.0 has it in sys/socket.h
AC_MSG_CHECKING(for socklen_t in sys/socket.h) AC_MSG_CHECKING(for socklen_t in sys/socket.h)
AC_TRY_COMPILE( AC_TRY_COMPILE(
@ -462,13 +467,13 @@ case "${host}" in
[ --disable-asmopt disable assembler optimization], [ --disable-asmopt disable assembler optimization],
ASM_ARCH=none ASM_ARCH=none
AC_MSG_RESULT(yes), AC_MSG_RESULT(yes),
AC_DEFINE(USE_INTEL_ASM) ASM_ARCH=yes
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
) )
;; ;;
*) AC_MSG_RESULT(no) *) AC_MSG_RESULT(no)
esac esac
AC_SUBST(ASM_ARCH) AM_CONDITIONAL(ASM_ARCH, test "$ASM_ARCH" = "yes")
dnl ================================================================== dnl ==================================================================
dnl Checks for sound dnl Checks for sound
@ -546,6 +551,15 @@ QF_maGiC_VALUE
], SNDTYPE="WIN32" ], SNDTYPE="WIN32"
SOUND_LIBS="-lwinmm") SOUND_LIBS="-lwinmm")
fi fi
dnl Sun
if test -z "$SNDTYPE" -a "x$ac_cv_header_sys_audioio_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],[
#include <sys/audioio.h>
#ifdef AUDIO_SETINFO
QF_maGiC_VALUE
#endif
], SNDTYPE="SUN")
fi
AC_MSG_RESULT([yes ($SNDTYPE)]) AC_MSG_RESULT([yes ($SNDTYPE)])
AC_SUBST(SOUND_LIBS) AC_SUBST(SOUND_LIBS)
@ -553,8 +567,7 @@ AM_CONDITIONAL(SNDTYPE_MME, test "$SNDTYPE" = "MME")
AM_CONDITIONAL(SNDTYPE_OSS, test "$SNDTYPE" = "OSS") AM_CONDITIONAL(SNDTYPE_OSS, test "$SNDTYPE" = "OSS")
AM_CONDITIONAL(SNDTYPE_ALSA, test "$SNDTYPE" = "ALSA") AM_CONDITIONAL(SNDTYPE_ALSA, test "$SNDTYPE" = "ALSA")
AM_CONDITIONAL(SNDTYPE_WIN32, test "$SNDTYPE" = "WIN32") AM_CONDITIONAL(SNDTYPE_WIN32, test "$SNDTYPE" = "WIN32")
AM_CONDITIONAL(SNDTYPE_NULL, test "$SNDTYPE" != "WIN32" -a "$SNDTYPE" != "ALSA" -a "$SNDTYPE" != "OSS" -a "$SNDTYPE" != "MME") AM_CONDITIONAL(SNDTYPE_SUN, test "$SNDTYPE" = "SUN")
dnl ================================================================== dnl ==================================================================
dnl Checks for CD-ROM dnl Checks for CD-ROM
@ -595,7 +608,43 @@ dnl ==================================================================
dnl Checks for networking dnl Checks for networking
dnl ================================================================== dnl ==================================================================
NET_LIBS="" if test "x$ac_cv_func_connect" != "xyes"; then
AC_CHECK_LIB(socket,connect,
NET_LIBS="$NET_LIBS -lsocket"
ac_cv_func_connect=yes)
fi
if test "x$ac_cv_func_gethostbyname" != "xyes"; then
AC_CHECK_LIB(nsl,gethostbyname,
NET_LIBS="$NET_LIBS -lnsl"
ac_cv_func_gethostbyname=yes)
fi
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_cv_func_connect=yes
ac_cv_func_gethostbyname=yes
HAVE_WSOCK=yes
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
LIBS="$SAVELIBS"
AC_MSG_CHECKING(for UDP support)
if test "x$ac_cv_func_connect" = "xyes" -a \
"x$ac_cv_func_gethostbyname" = "xyes"; then
HAVE_UDP=yes
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test "x$ac_cv_func_connect" != "xyes"; then if test "x$ac_cv_func_connect" != "xyes"; then
AC_MSG_CHECKING([for connect in -lwsock32]) AC_MSG_CHECKING([for connect in -lwsock32])
SAVELIBS="$LIBS" SAVELIBS="$LIBS"