mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-25 21:31:49 +00:00
make inet_ntop check work on non Win32 OS
This commit is contained in:
parent
d7d56086d5
commit
58558c7517
2 changed files with 16 additions and 14 deletions
|
@ -101,6 +101,7 @@ include ( DefaultDirs )
|
|||
# Basic C library checks
|
||||
include ( CheckSTDC )
|
||||
include ( CheckIncludeFile )
|
||||
include ( CheckFunctionExists )
|
||||
check_include_file ( string.h HAVE_STRING_H )
|
||||
check_include_file ( stdlib.h HAVE_STDLIB_H )
|
||||
check_include_file ( stdio.h HAVE_STDIO_H )
|
||||
|
@ -166,12 +167,6 @@ if ( WIN32 )
|
|||
if ( MINGW )
|
||||
set ( MINGW32 1 )
|
||||
add_definitions ( -mms-bitfields )
|
||||
include(CheckFunctionExists)
|
||||
CHECK_FUNCTION_EXISTS ( "inet_ntop" HAVE_INETNTOP )
|
||||
if (NOT HAVE_INETNTOP )
|
||||
set ( IPV6 0 )
|
||||
set ( IPV6_SUPPORT 0 )
|
||||
endif ( NOT HAVE_INETNTOP )
|
||||
endif ( MINGW )
|
||||
else ( WIN32 )
|
||||
# Check PThreads, but not in Windows
|
||||
|
@ -230,6 +225,18 @@ if ( ${CMAKE_SYSTEM} MATCHES "Darwin" )
|
|||
endif ( enable-framework )
|
||||
endif ( ${CMAKE_SYSTEM} MATCHES "Darwin" )
|
||||
|
||||
|
||||
unset ( HAVE_INETNTOP CACHE )
|
||||
unset ( IPV6_SUPPORT CACHE )
|
||||
unset ( IPV6 CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "inet_ntop" HAVE_INETNTOP )
|
||||
if ( enable-ipv6 )
|
||||
if ( HAVE_INETNTOP )
|
||||
set ( IPV6 1 )
|
||||
set ( IPV6_SUPPORT 1 )
|
||||
endif ( HAVE_INETNTOP )
|
||||
endif ( enable-ipv6 )
|
||||
|
||||
unset ( WITH_FLOAT CACHE )
|
||||
if ( enable-floats )
|
||||
set ( WITH_FLOAT 1 )
|
||||
|
@ -395,14 +402,6 @@ else ( enable-dbus )
|
|||
unset_pkg_config ( DBUS )
|
||||
endif ( enable-dbus )
|
||||
|
||||
unset ( IPV6_SUPPORT CACHE )
|
||||
if ( HAVE_INETNTOP )
|
||||
if ( enable-ipv6 )
|
||||
set ( IPV6 1 )
|
||||
set ( IPV6_SUPPORT 1 )
|
||||
endif ( enable-ipv6 )
|
||||
endif ( HAVE_INETNTOP )
|
||||
|
||||
# General configuration file
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
|
||||
${CMAKE_BINARY_DIR}/config.h )
|
||||
|
|
|
@ -133,6 +133,9 @@
|
|||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@
|
||||
|
||||
/* Define to 1 if you have the inet_ntop() function. */
|
||||
#cmakedefine HAVE_INETNTOP @HAVE_INETNTOP@
|
||||
|
||||
/* Define to enable JACK driver */
|
||||
#cmakedefine JACK_SUPPORT @JACK_SUPPORT@
|
||||
|
||||
|
|
Loading…
Reference in a new issue