Fixed bug 3801 - HAVE_LIBSAMPLERATE_H depending on HAVE_LIBC in current SDL_config.h.in
authorSam Lantinga <slouken@libsdl.org>
Wed, 06 Sep 2017 10:31:05 -0700
changeset 11458ab430a52b113
parent 11457 3db9f2a42870
child 11459 a09ca9e8938c
Fixed bug 3801 - HAVE_LIBSAMPLERATE_H depending on HAVE_LIBC in current SDL_config.h.in

Ozkan Sezer

HAVE_LIBSAMPLERATE_H is depending on HAVE_LIBC in current config.h.in:
it shouldn't be. HAVE_LIBUDEV_H, HAVE_DBUS_DBUS_H, HAVE_IBUS_IBUS_H,
HAVE_FCITX_FRONTEND_H, and HAVE_ALTIVEC_H have the same situation too.
I suggest something like the following, which moves them out of the
HAVE_LIBC confinement and also moves the windows dx header stuff along
side them. (Not ideal, but a bit cleaner I think.)
include/SDL_config.h.cmake
include/SDL_config.h.in
     1.1 --- a/include/SDL_config.h.cmake	Wed Sep 06 01:14:23 2017 -0700
     1.2 +++ b/include/SDL_config.h.cmake	Wed Sep 06 10:31:05 2017 -0700
     1.3 @@ -47,17 +47,6 @@
     1.4  #cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
     1.5  #cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
     1.6  
     1.7 -#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
     1.8 -#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
     1.9 -#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
    1.10 -#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
    1.11 -#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
    1.12 -#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@
    1.13 -#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
    1.14 -#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
    1.15 -#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
    1.16 -#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
    1.17 -
    1.18  /* Comment this if you want to build without any C library requirements */
    1.19  #cmakedefine HAVE_LIBC 1
    1.20  #if HAVE_LIBC
    1.21 @@ -81,13 +70,7 @@
    1.22  #cmakedefine HAVE_FLOAT_H 1
    1.23  #cmakedefine HAVE_ICONV_H 1
    1.24  #cmakedefine HAVE_SIGNAL_H 1
    1.25 -#cmakedefine HAVE_ALTIVEC_H 1
    1.26  #cmakedefine HAVE_PTHREAD_NP_H 1
    1.27 -#cmakedefine HAVE_LIBUDEV_H 1
    1.28 -#cmakedefine HAVE_DBUS_DBUS_H 1
    1.29 -#cmakedefine HAVE_IBUS_IBUS_H 1
    1.30 -#cmakedefine HAVE_FCITX_FRONTEND_H 1
    1.31 -#cmakedefine HAVE_LIBSAMPLERATE_H 1
    1.32  
    1.33  /* C library functions */
    1.34  #cmakedefine HAVE_MALLOC 1
    1.35 @@ -187,11 +170,30 @@
    1.36  #elif __WIN32__
    1.37  #cmakedefine HAVE_STDARG_H 1
    1.38  #cmakedefine HAVE_STDDEF_H 1
    1.39 +#cmakedefine HAVE_FLOAT_H 1
    1.40  #else
    1.41  /* We may need some replacement for stdarg.h here */
    1.42  #include <stdarg.h>
    1.43  #endif /* HAVE_LIBC */
    1.44  
    1.45 +#cmakedefine HAVE_ALTIVEC_H 1
    1.46 +#cmakedefine HAVE_LIBUDEV_H 1
    1.47 +#cmakedefine HAVE_DBUS_DBUS_H 1
    1.48 +#cmakedefine HAVE_IBUS_IBUS_H 1
    1.49 +#cmakedefine HAVE_FCITX_FRONTEND_H 1
    1.50 +#cmakedefine HAVE_LIBSAMPLERATE_H 1
    1.51 +
    1.52 +#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
    1.53 +#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
    1.54 +#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
    1.55 +#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
    1.56 +#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
    1.57 +#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@
    1.58 +#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
    1.59 +#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
    1.60 +#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
    1.61 +#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
    1.62 +
    1.63  /* SDL internal assertion support */
    1.64  #cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
    1.65  
     2.1 --- a/include/SDL_config.h.in	Wed Sep 06 01:14:23 2017 -0700
     2.2 +++ b/include/SDL_config.h.in	Wed Sep 06 10:31:05 2017 -0700
     2.3 @@ -50,14 +50,6 @@
     2.4  #undef HAVE_GCC_ATOMICS
     2.5  #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
     2.6  
     2.7 -#undef HAVE_DDRAW_H
     2.8 -#undef HAVE_DINPUT_H
     2.9 -#undef HAVE_DSOUND_H
    2.10 -#undef HAVE_DXGI_H
    2.11 -#undef HAVE_XINPUT_H
    2.12 -#undef HAVE_XINPUT_GAMEPAD_EX
    2.13 -#undef HAVE_XINPUT_STATE_EX
    2.14 -
    2.15  /* Comment this if you want to build without any C library requirements */
    2.16  #undef HAVE_LIBC
    2.17  #if HAVE_LIBC
    2.18 @@ -81,13 +73,7 @@
    2.19  #undef HAVE_FLOAT_H
    2.20  #undef HAVE_ICONV_H
    2.21  #undef HAVE_SIGNAL_H
    2.22 -#undef HAVE_ALTIVEC_H
    2.23  #undef HAVE_PTHREAD_NP_H
    2.24 -#undef HAVE_LIBUDEV_H
    2.25 -#undef HAVE_DBUS_DBUS_H
    2.26 -#undef HAVE_IBUS_IBUS_H
    2.27 -#undef HAVE_FCITX_FRONTEND_H
    2.28 -#undef HAVE_LIBSAMPLERATE_H
    2.29  
    2.30  /* C library functions */
    2.31  #undef HAVE_MALLOC
    2.32 @@ -192,6 +178,21 @@
    2.33  #define HAVE_STDINT_H   1
    2.34  #endif /* HAVE_LIBC */
    2.35  
    2.36 +#undef HAVE_ALTIVEC_H
    2.37 +#undef HAVE_LIBUDEV_H
    2.38 +#undef HAVE_DBUS_DBUS_H
    2.39 +#undef HAVE_IBUS_IBUS_H
    2.40 +#undef HAVE_FCITX_FRONTEND_H
    2.41 +#undef HAVE_LIBSAMPLERATE_H
    2.42 +
    2.43 +#undef HAVE_DDRAW_H
    2.44 +#undef HAVE_DINPUT_H
    2.45 +#undef HAVE_DSOUND_H
    2.46 +#undef HAVE_DXGI_H
    2.47 +#undef HAVE_XINPUT_H
    2.48 +#undef HAVE_XINPUT_GAMEPAD_EX
    2.49 +#undef HAVE_XINPUT_STATE_EX
    2.50 +
    2.51  /* SDL internal assertion support */
    2.52  #undef SDL_DEFAULT_ASSERT_LEVEL
    2.53