Mercurial > SDL_sound_CoreAudio
comparison configure.in @ 524:a0bb7a9c05b1
Added -fvisibility=hidden support.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 06 Aug 2007 09:41:58 +0000 |
parents | 46d5f399cb35 |
children | a116d8f628a0 |
comparison
equal
deleted
inserted
replaced
523:3a3807dcf57f | 524:a0bb7a9c05b1 |
---|---|
64 AC_ARG_ENABLE(debug, | 64 AC_ARG_ENABLE(debug, |
65 [ --enable-debug enable debug mode [default=no]], | 65 [ --enable-debug enable debug mode [default=no]], |
66 , enable_debug=no) | 66 , enable_debug=no) |
67 if test x$enable_debug = xyes; then | 67 if test x$enable_debug = xyes; then |
68 if test x$ac_cv_prog_cc_g = xyes; then | 68 if test x$ac_cv_prog_cc_g = xyes; then |
69 CFLAGS="-g -O0" | 69 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -g -O0" |
70 else | 70 else |
71 CFLAGS="-O0" | 71 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -O0" |
72 fi | 72 fi |
73 CFLAGS="$CFLAGS -Werror" | 73 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS -Werror" |
74 AC_DEFINE(DEBUG, 1, [Define for debug builds.]) | 74 AC_DEFINE(DEBUG, 1, [Define for debug builds.]) |
75 AC_DEFINE(DEBUG_CHATTER, 1, [Define for debug build chattering.]) | 75 AC_DEFINE(DEBUG_CHATTER, 1, [Define for debug build chattering.]) |
76 else | 76 else |
77 AC_DEFINE(NDEBUG, 1, [Define to disable debugging.]) | 77 AC_DEFINE(NDEBUG, 1, [Define to disable debugging.]) |
78 fi | |
79 | |
80 dnl --------------------------------------------------------------------- | |
81 dnl Have GCC's -fvisibility option? | |
82 dnl --------------------------------------------------------------------- | |
83 AC_MSG_CHECKING(for GCC -fvisibility=hidden option) | |
84 have_gcc_fvisibility=no | |
85 visibility_CFLAGS="-fvisibility=hidden" | |
86 save_CFLAGS="$CFLAGS" | |
87 CFLAGS="$save_CFLAGS $visibility_CFLAGS" | |
88 AC_TRY_COMPILE([ | |
89 int placeholder = 1; | |
90 ],[ | |
91 ],[ | |
92 have_gcc_fvisibility=yes | |
93 ]) | |
94 AC_MSG_RESULT($have_gcc_fvisibility) | |
95 CFLAGS="$save_CFLAGS" | |
96 | |
97 if test x$have_gcc_fvisibility = xyes; then | |
98 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS $visibility_CFLAGS" | |
78 fi | 99 fi |
79 | 100 |
80 | 101 |
81 dnl --------------------------------------------------------------------- | 102 dnl --------------------------------------------------------------------- |
82 dnl Checks for libraries. | 103 dnl Checks for libraries. |
86 SDL_VERSION=1.2.0 | 107 SDL_VERSION=1.2.0 |
87 AM_PATH_SDL($SDL_VERSION, | 108 AM_PATH_SDL($SDL_VERSION, |
88 :, | 109 :, |
89 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) | 110 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
90 ) | 111 ) |
91 CFLAGS="$CFLAGS $SDL_CFLAGS" | 112 SDLSOUNDCFLAGS="$SDLSOUNDCFLAGS $SDL_CFLAGS" |
92 LIBS="$LIBS $SDL_LIBS" | 113 LIBS="$LIBS $SDL_LIBS" |
93 | 114 |
94 | 115 |
95 dnl Check for voc decoder inclusion... | 116 dnl Check for voc decoder inclusion... |
96 AC_ARG_ENABLE(voc, | 117 AC_ARG_ENABLE(voc, |
233 fi | 254 fi |
234 fi | 255 fi |
235 fi | 256 fi |
236 | 257 |
237 if test x$have_vorbis = xyes; then | 258 if test x$have_vorbis = xyes; then |
238 CFLAGS="$CFLAGS" | |
239 LIBS="$LIBS -logg -lvorbis -lvorbisfile" | 259 LIBS="$LIBS -logg -lvorbis -lvorbisfile" |
240 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.]) | 260 AC_DEFINE(SOUND_SUPPORTS_OGG, 1, [Define if OGG support is desired.]) |
241 fi | 261 fi |
242 fi | 262 fi |
243 | 263 |
322 | 342 |
323 | 343 |
324 AC_FUNC_MEMCMP | 344 AC_FUNC_MEMCMP |
325 AC_CHECK_FUNCS([memset strrchr setbuf]) | 345 AC_CHECK_FUNCS([memset strrchr setbuf]) |
326 | 346 |
347 CFLAGS="$SDLSOUNDCFLAGS $CFLAGS -D_REENTRANT -D_THREAD_SAFE" | |
348 | |
327 dnl Add Makefile conditionals | 349 dnl Add Makefile conditionals |
328 AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes) | 350 AM_CONDITIONAL(USE_TIMIDITY, test x$enable_midi = xyes) |
329 AM_CONDITIONAL(USE_MPGLIB, test x$enable_mpglib = xyes) | 351 AM_CONDITIONAL(USE_MPGLIB, test x$enable_mpglib = xyes) |
330 AM_CONDITIONAL(USE_PHYSICSFS, test x$enable_physfs = xyes) | 352 AM_CONDITIONAL(USE_PHYSICSFS, test x$enable_physfs = xyes) |
331 | 353 |