mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 06:12:04 +08:00
cmake+autotools: add option to enable/disable iconv
This commit is contained in:
committed by
Sam Lantinga
parent
e41942e814
commit
c9f60cce40
+19
-5
@@ -317,6 +317,12 @@ dnl See whether we are allowed to use the system C library
|
||||
AC_ARG_ENABLE(libc,
|
||||
[AS_HELP_STRING([--enable-libc], [Use the system C library [default=yes]])],
|
||||
, enable_libc=yes)
|
||||
|
||||
dnl See whether we are allowed to use libiconv
|
||||
AC_ARG_ENABLE(iconv,
|
||||
[AS_HELP_STRING([--enable-iconv], [Enable character set conversion through iconv [default=yes]])],
|
||||
, enable_iconv=yes)
|
||||
|
||||
if test x$enable_libc = xyes; then
|
||||
AC_DEFINE(HAVE_LIBC, 1, [ ])
|
||||
|
||||
@@ -347,8 +353,10 @@ dnl Checks for library functions.
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
|
||||
|
||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
if test x$enable_iconv = xyes; then
|
||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
fi
|
||||
|
||||
AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
|
||||
|
||||
@@ -4297,7 +4305,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
|
||||
SUMMARY_video="${SUMMARY_video} uikit"
|
||||
have_video=yes
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"
|
||||
if test x$enable_iconv = xyes; then
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
|
||||
@@ -4559,8 +4571,10 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
|
||||
|
||||
# Set up the core platform files
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
|
||||
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
|
||||
if test x$enable_iconv = xyes; then
|
||||
if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
|
||||
fi
|
||||
fi
|
||||
# Use the Unix locale APIs.
|
||||
if test x$enable_locale = xyes; then
|
||||
|
||||
Reference in New Issue
Block a user