1 dnl Copyright (C) 1999-2022 Erik de Castro Lopo <erikd@mega-nerd.com>.
3 dnl Require autoconf version >= 2.69
6 AC_INIT([libsndfile],[1.2.2],[sndfile@mega-nerd.com],
7 [libsndfile],[http://libsndfile.github.io/libsndfile/])
9 dnl Check whether we want to set defaults for CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS
10 AC_MSG_CHECKING([whether configure should try to set CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS])
11 AS_IF([test "x${CFLAGS+set}" = "xset" || test "x${CXXFLAGS+set}" = "xset" || test "x${CPPFLAGS+set}" = "xset" || test "x${LDFLAGS+set}" = "xset"], [
12 enable_flags_setting=no
16 enable_flags_setting=yes
17 dnl Set to empty flags so AC_PROG_CC and
18 dnl AC_PROG_CXX do not add -g -O2
22 AC_MSG_RESULT([${enable_flags_setting}])
24 dnl Put config stuff in 'build-aux'.
25 AC_CONFIG_AUX_DIR([build-aux])
27 AC_CONFIG_SRCDIR([src/sndfile.c])
30 AC_CONFIG_MACRO_DIR([m4])
31 AC_CONFIG_HEADERS([src/config.h])
33 AM_INIT_AUTOMAKE([1.14 foreign dist-xz no-dist-gzip serial-tests subdir-objects])
34 AM_SILENT_RULES([yes])
36 dnl ====================================================================================
41 AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
42 AC_MSG_ERROR([libsndfile requires a C99 capable compiler!])
45 AC_USE_SYSTEM_EXTENSIONS
60 LT_INIT([disable-static win32-dll])
68 AC_CHECK_PROG([HAVE_AUTOGEN], [autogen], [yes], [no])
69 AC_CHECK_PROG([HAVE_WINE], [wine], [yes], [no])
70 AC_CHECK_PROG([HAVE_XCODE_SELECT], [xcode-select], [yes], [no])
72 dnl ------------------------------------------------------------------------------------
73 dnl Rules for library version information:
75 dnl 1. Start with version information of `0:0:0' for each libtool library.
76 dnl 2. Update the version information only immediately before a public release of
77 dnl your software. More frequent updates are unnecessary, and only guarantee
78 dnl that the current interface number gets larger faster.
79 dnl 3. If the library source code has changed at all since the last update, then
80 dnl increment revision (`c:r:a' becomes `c:r+1:a').
81 dnl 4. If any interfaces have been added, removed, or changed since the last update,
82 dnl increment current, and set revision to 0.
83 dnl 5. If any interfaces have been added since the last public release, then increment
85 dnl 6. If any interfaces have been removed since the last public release, then set age
88 dnl This is libtool version of library, we add it to `--version-info` property.
90 m4_define([lt_current], [1])
91 m4_define([lt_revision], [37])
92 m4_define([lt_age], [0])
94 dnl This is ABI version for linker scripts, CMake uses the same format for
95 dnl VERSION property of shared library.
96 dnl The formula is: c:r:a -> c-a:a:r
98 m4_define([abi_version_major], [m4_eval(lt_current - lt_age)])
99 m4_define([abi_version_minor], [lt_age])
100 m4_define([abi_version_patch], [lt_revision])
102 dnl ------------------------------------------------------------------------------------
104 AC_CHECK_HEADERS([endian.h])
105 AC_CHECK_HEADERS([byteswap.h])
106 AC_CHECK_HEADERS([locale.h])
107 AC_CHECK_HEADERS([sys/time.h])
108 AC_CHECK_HEADERS([immintrin.h])
109 AC_CHECK_HEADERS([stdbool.h])
113 AC_CHECK_DECLS([S_IRGRP])
114 AS_IF([test "x$ac_cv_have_decl_S_IRGRP" = "xyes"], [
115 AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [1], [Set to 1 if S_IRGRP is defined.])
117 AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [0], [Set to 0 if S_IRGRP is not defined.])
120 AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST],
121 [test "x${build_os}:${host_os}:${HAVE_WINE}" = "xlinux-gnu:mingw32msvc:yes"])
123 dnl ====================================================================================
124 dnl Couple of initializations here. Fill in real values later.
128 dnl ====================================================================================
129 dnl Finished checking, handle options.
131 AC_ARG_ENABLE(experimental,
132 AS_HELP_STRING([--enable-experimental], [enable experimental code]))
134 AS_IF([test "x$enable_experimental" = "xyes"], [
139 AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE], [${EXPERIMENTAL_CODE}], [Set to 1 to enable experimental code.])
141 AC_ARG_ENABLE([werror],
142 [AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles])])
144 AC_ARG_ENABLE([cpu-clip],
145 [AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper])])
147 AC_ARG_ENABLE([bow-docs],
148 [AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs])])
150 AC_ARG_ENABLE([sqlite],
151 [AS_HELP_STRING([--disable-sqlite], [disable use of sqlite])])
153 AC_ARG_ENABLE([alsa],
154 [AS_HELP_STRING([--disable-alsa], [disable ALSA support (default=autodetect)])], [], [enable_alsa=auto])
156 AC_ARG_ENABLE([external-libs],
157 [AS_HELP_STRING([--disable-external-libs], [disable use of Ogg and Vorbis [[default=no]]])])
159 AC_ARG_ENABLE([mpeg],
160 [AS_HELP_STRING([--disable-mpeg], [disable use of LAME/MPG123 for MPEG (MP3) [[defaults=no]]])])
162 AC_ARG_ENABLE(octave,
163 [AS_HELP_STRING([--enable-octave], [enable building of GNU Octave module])])
165 AC_ARG_ENABLE([full-suite],
166 [AS_HELP_STRING([--disable-full-suite], [disable building and installing programs, documentation, only build library [[default=no]]])])
167 AM_CONDITIONAL([FULL_SUITE], [test "x$enable_full_suite" != "xno"])
169 AC_ARG_ENABLE([test-coverage],
170 [AS_HELP_STRING([--enable-test-coverage], [enable test coverage])])
171 AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "x$enable_test_coverage" = "xyes"])
173 AC_ARG_ENABLE([ossfuzzers],
174 [AS_HELP_STRING([--enable-ossfuzzers], [Whether to generate the fuzzers for OSS-Fuzz])])
175 AM_CONDITIONAL([USE_OSSFUZZERS], [test "x$enable_ossfuzzers" = "xyes"])
177 AC_SUBST([LIB_FUZZING_ENGINE])
178 AM_CONDITIONAL([USE_OSSFUZZ_FLAG], [test "x$LIB_FUZZING_ENGINE" = "x-fsanitize=fuzzer"])
179 AM_CONDITIONAL([USE_OSSFUZZ_STATIC], [test -f "$LIB_FUZZING_ENGINE"])
181 dnl ====================================================================================
182 dnl Check types and their sizes.
184 AC_CHECK_SIZEOF([wchar_t], [4])
185 AC_CHECK_SIZEOF([short], [2])
186 AC_CHECK_SIZEOF([int], [4])
187 AC_CHECK_SIZEOF([long], [4])
188 AC_CHECK_SIZEOF([float], [4])
189 AC_CHECK_SIZEOF([double], [4])
190 AC_CHECK_SIZEOF([void*], [8])
191 AC_CHECK_SIZEOF([size_t], [4])
192 AC_CHECK_SIZEOF([int64_t], [8])
193 AC_CHECK_SIZEOF([long long], [8])
195 dnl Check for common 64 bit file offset types.
196 AC_CHECK_SIZEOF([off_t], [1])
198 AS_IF([test "x$enable_largefile:$ac_cv_sizeof_off_t" = "xno:8"], [
199 AC_MSG_ERROR(["Error : Cannot disable large file support because sizeof (off_t) == 8."])
204 AC_DEFINE([__USE_MINGW_ANSI_STDIO], [1], [Set to 1 to use C99 printf/snprintf in MinGW.])
208 AS_IF([test "x$ac_cv_sizeof_off_t" = "x8"], [
209 dnl If sizeof (off_t) is 8, no further checking is needed.
211 dnl Save the old sizeof (off_t) value and then unset it to see if it
212 dnl changes when Large File Support is enabled.
213 pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t
214 unset ac_cv_sizeof_off_t
217 AS_IF([test "x$ac_cv_sys_largefile_CFLAGS" = "xno"], [
218 ac_cv_sys_largefile_CFLAGS=""
220 AS_IF([test "x$ac_cv_sys_largefile_LDFLAGS" = "xno"], [
221 ac_cv_sys_largefile_LDFLAGS=""
223 AS_IF([test "x$ac_cv_sys_largefile_LIBS" = "xno"], [
224 ac_cv_sys_largefile_LIBS=""
227 AC_CHECK_SIZEOF(off_t,1)
233 dnl ====================================================================================
234 dnl Determine endian-ness of host processor.
239 ac_cv_c_little_endian=0
243 ac_cv_c_little_endian=1
246 AC_DEFINE_UNQUOTED([CPU_IS_BIG_ENDIAN], [${ac_cv_c_big_endian}], [Host processor is big endian.])
247 AC_DEFINE_UNQUOTED([CPU_IS_LITTLE_ENDIAN], [${ac_cv_c_little_endian}], [Host processor is little endian.])
249 dnl ====================================================================================
250 dnl Check for functions.
252 AC_CHECK_FUNCS([malloc calloc realloc free])
253 AC_CHECK_FUNCS([open read write lseek lseek64])
254 AC_CHECK_FUNCS([fstat fstat64 ftruncate fsync])
255 AC_CHECK_FUNCS([snprintf vsnprintf])
256 AC_CHECK_FUNCS([gmtime gmtime_r localtime localtime_r gettimeofday])
257 AC_CHECK_FUNCS([mmap getpagesize])
258 AC_CHECK_FUNCS([setlocale])
259 AC_CHECK_FUNCS([pipe waitpid])
261 AC_SEARCH_LIBS([floor], [m], [], [
262 AC_MSG_ERROR([unable to find the floor() function!])
264 AC_CHECK_FUNCS([floor ceil fmod lrint lrintf])
266 dnl ====================================================================================
267 dnl Check for requirements for building plugins for other languages/enviroments.
269 dnl Octave maths environment http://www.octave.org/
270 AS_IF([test "x$cross_compiling" = "xno"], [
271 AS_IF([test "x$enable_octave" = "xno"], [
272 AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
277 AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
280 dnl ====================================================================================
281 dnl Check for Ogg, Vorbis.
283 HAVE_EXTERNAL_XIPH_LIBS=0
284 EXTERNAL_XIPH_CFLAGS=""
285 EXTERNAL_XIPH_LIBS=""
286 EXTERNAL_XIPH_REQUIRE=""
288 dnl Check for pkg-config outside the if statement.
290 AX_REQUIRE_DEFINED([PKG_INSTALLDIR])
293 AS_IF([test -n "$PKG_CONFIG"], [
294 AS_IF([test "x$enable_external_libs" = "xno"], [
295 AC_MSG_WARN([[*** External libs (Ogg, Vorbis) disabled. ***]])
297 PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.3.0, ac_cv_ogg=yes, ac_cv_ogg=no)
299 AS_IF([test "x$enable_experimental" = "xyes"], [
300 PKG_CHECK_MOD_VERSION(SPEEX, speex >= 1.2, ac_cv_speex=yes, ac_cv_speex=no)
306 dnl Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile
307 dnl test suite to fail on MIPS, PowerPC and others.
308 dnl See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
309 PKG_CHECK_MOD_VERSION(VORBIS, vorbis >= 1.2.3, ac_cv_vorbis=yes, ac_cv_vorbis=no)
310 PKG_CHECK_MOD_VERSION(VORBISENC, vorbisenc >= 1.2.3, ac_cv_vorbisenc=yes, ac_cv_vorbisenc=no)
312 PKG_CHECK_MOD_VERSION(OPUS, opus >= 1.1, ac_cv_opus=yes, ac_cv_opus=no)
313 enable_external_libs=yes
316 AS_IF([test "x$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc$ac_cv_opus" = "xyesyesyesyes"], [
317 HAVE_EXTERNAL_XIPH_LIBS=1
318 enable_external_libs=yes
320 EXTERNAL_XIPH_CFLAGS="$VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OPUS_CFLAGS $OGG_CFLAGS "
321 EXTERNAL_XIPH_LIBS="$VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OPUS_LIBS $OGG_LIBS "
322 EXTERNAL_XIPH_REQUIRE="ogg vorbis vorbisenc opus"
324 if test x$ac_cv_speex = "xyes" ; then
325 EXTERNAL_XIPH_REQUIRE="$EXTERNAL_XIPH_REQUIRE speex"
329 AC_MSG_WARN([[*** One or more of the external libraries (ie libogg,]])
330 AC_MSG_WARN([[*** libvorbis and libopus) is either missing (possibly only the development]])
331 AC_MSG_WARN([[*** headers) or is of an unsupported version.]])
333 AC_MSG_WARN([[*** Unfortunately, for ease of maintenance, the external libs]])
334 AC_MSG_WARN([[*** are an all or nothing affair.]])
336 enable_external_libs=no
340 AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], [$HAVE_EXTERNAL_XIPH_LIBS], [Will be set to 1 if ogg, vorbis, and opus are available.])
342 dnl ====================================================================================
343 dnl Check for MPEG libraris liblame
348 EXTERNAL_MPEG_REQUIRE=""
349 EXTERNAL_MPEG_LIBS=""
351 AS_IF([test -n "$PKG_CONFIG"], [
352 AS_IF([test "x$enable_mpeg" = "xno"], [
353 AC_MSG_WARN([[*** MPEG (Lame/MPG123) disabled. ***]])
355 AC_CHECK_HEADER(lame/lame.h,
356 lame_header_found="yes",
357 lame_header_found="no")
358 AC_SEARCH_LIBS(lame_set_VBR_q, [lame mp3lame], [lame_lib_found="yes"], [lame_lib_found="no"])
359 AS_IF([test "x$lame_lib_found$lame_header_found" = "xyesyes"], [
362 AC_MSG_WARN([["MPEG support selected but external Lame library cannot be found.]])
365 PKG_CHECK_MOD_VERSION([MPG123], [libmpg123 >= 1.25.10], [
368 AC_MSG_WARN([["MPEG support selected but external MPG123 library cannot be found.]])
371 AS_IF([test "x$ac_cv_lame$ac_cv_mpg123" = "xyesyes"], [
374 EXTERNAL_MPEG_REQUIRE="libmpg123"
375 EXTERNAL_MPEG_LIBS="-lmp3lame"
376 MPEG_CFLAGS="$MPG123_CFLAGS"
377 MPEG_LIBS="$MPG123_LIBS"
381 AC_MSG_WARN([[*** MPEG support disabled.]])
387 AC_DEFINE_UNQUOTED([HAVE_MPEG], [$HAVE_MPEG], [Will be set to 1 if lame, mpg123 mpeg support is available.])
389 dnl ====================================================================================
390 dnl Check for libsqlite3 (only used in regtest).
393 AS_IF([test "x$enable_sqlite" != "xno"], [
394 PKG_CHECK_MOD_VERSION([SQLITE3], [sqlite3 >= 3.2], [ac_cv_sqlite3=1], [ac_cv_sqlite3=0])
397 AC_DEFINE_UNQUOTED([HAVE_SQLITE3], [${ac_cv_sqlite3}], [Set to 1 if you have libsqlite3.])
398 AM_CONDITIONAL([HAVE_SQLITE3], [test "x$ac_cv_sqlite3" = "x1"])
400 dnl ====================================================================================
401 dnl Determine if the processor can do clipping on float to int conversions.
403 AS_IF([test "x$enable_cpu_clip" != "xno"], [
406 AS_ECHO(["checking processor clipping capabilities... disabled"])
407 ac_cv_c_clip_positive=0
408 ac_cv_c_clip_negative=0
411 AC_DEFINE_UNQUOTED([CPU_CLIPS_POSITIVE], [${ac_cv_c_clip_positive}],
412 [Host processor clips on positive float to int conversion.])
413 AC_DEFINE_UNQUOTED([CPU_CLIPS_NEGATIVE], [${ac_cv_c_clip_negative}],
414 [Host processor clips on negative float to int conversion.])
416 dnl ====================================================================================
417 dnl Host OS specific stuff.
419 OS_SPECIFIC_CFLAGS=""
425 [darwin* | rhapsody*], [
426 AS_IF([test "x$HAVE_XCODE_SELECT" = "xyes"], [
427 developer_path=`xcode-select --print-path`
429 developer_path="/Developer"
431 OS_SPECIFIC_LINKS="-framework CoreAudio -framework AudioToolbox -framework CoreFoundation"],
435 OS_SPECIFIC_LINKS="-lwinmm"],
440 AC_DEFINE_UNQUOTED([OS_IS_WIN32], [${os_is_win32}], [Set to 1 if compiling for Win32])
441 AC_DEFINE_UNQUOTED([OS_IS_OPENBSD], [${os_is_openbsd}], [Set to 1 if compiling for OpenBSD])
442 AC_DEFINE_UNQUOTED([USE_WINDOWS_API], [${use_windows_api}], [Set to 1 to use the native windows API])
443 AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1)
445 dnl ====================================================================================
448 AS_IF([test "x$enable_alsa" != "xno"], [
449 PKG_CHECK_MODULES([ALSA], [alsa], [
450 dnl actually test whether ALSA really works, in
451 dnl order to dodge wrong cross-compilation pickups
452 save_CFLAGS="${CFLAGS}"
454 CFLAGS="${CFLAGS} ${ALSA_CFLAGS}"
455 LIBS="${LIBS} ${ALSA_LIBS}"
456 AC_CHECK_HEADERS([alsa/asoundlib.h])
457 AS_IF([test "x$ac_cv_header_alsa_asoundlib_h" = "xyes"], [
458 dnl ALSA definitely works
459 AC_DEFINE([HAVE_ALSA], [1], [Set to 1 if you have alsa])
462 dnl picked up wrong ALSA
469 CFLAGS="${save_CFLAGS}"
472 dnl could not find ALSA
476 AS_IF([test "x$alsa_works" = "xno"], [
477 AS_IF([test "x$enable_alsa" = "xyes"], [
478 dnl explicitly passed --enable-alsa, hence error out loud and clearly
479 AC_MSG_ERROR([You explicitly requested alsa support, but alsa could not be found!])
481 dnl did not explicitly pass --enable-alsa, relying on default automagic on
482 enable_alsa="no (auto)"
487 dnl ====================================================================================
488 dnl Check for OpenBSD's sndio.
494 AC_CHECK_HEADERS(sndio.h)
495 AS_IF([test "x$ac_cv_header_sndio_h" = "xyes"], [
501 AC_DEFINE_UNQUOTED([HAVE_SNDIO_H], [${HAVE_SNDIO_H}], [Set to 1 if <sndio.h> is available.])
503 dnl ====================================================================================
504 dnl Test for sanity when cross-compiling.
506 AS_IF([test "x$ac_cv_sizeof_short" != "x2"], [
507 AC_MSG_WARN([[******************************************************************]])
508 AC_MSG_WARN([[*** sizeof (short) != 2. ]])
509 AC_MSG_WARN([[******************************************************************]])
512 AS_IF([test "x$ac_cv_sizeof_int" != "x4"], [
513 AC_MSG_WARN([[******************************************************************]])
514 AC_MSG_WARN([[*** sizeof (int) != 4 ]])
515 AC_MSG_WARN([[******************************************************************]])
518 AS_IF([test "x$ac_cv_sizeof_float" != "x4"], [
519 AC_MSG_WARN([[******************************************************************]])
520 AC_MSG_WARN([[*** sizeof (float) != 4. ]])
521 AC_MSG_WARN([[******************************************************************]])
524 AS_IF([test "x$ac_cv_sizeof_double" != "x8"], [
525 AC_MSG_WARN([[******************************************************************]])
526 AC_MSG_WARN([[*** sizeof (double) != 8. ]])
527 AC_MSG_WARN([[******************************************************************]])
530 AS_IF([test "x$ac_cv_prog_HAVE_AUTOGEN" = "xno"], [
531 AC_MSG_WARN([[Touching files in directory tests/.]])
532 touch tests/*.c tests/*.h
535 dnl ====================================================================================
536 dnl Settings for the HTML documentation.
538 AS_IF([test "x$enable_bow_docs" = "xyes"], [
539 HTML_BGCOLOUR="white"
540 HTML_FGCOLOUR="black"
542 HTML_BGCOLOUR="black"
543 HTML_FGCOLOUR="white"
546 dnl ====================================================================================
547 dnl Now use the information from the checking stage.
552 AS_IF([test "x$enable_flags_setting" = "xyes"], [
553 AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CFLAGS])
556 AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CXXFLAGS])
559 AS_CASE([${host_os}],
561 ldflags_test="-Wl,-dead_strip_dylibs"],
563 ldflags_test="-Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections"]
565 AX_APPEND_LINK_FLAGS([${ldflags_test}], [LDFLAGS])
568 AS_IF([test "x$enable_werror" = "xyes"], [
569 AX_APPEND_COMPILE_FLAGS([-Werror], [CFLAGS])
572 AX_APPEND_COMPILE_FLAGS([-Werror], [CXXFLAGS])
576 common_flags="-Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wundef -Wuninitialized -Winit-self"
577 common_cflags="${common_flags}"
578 dnl Clang doesn't know about -Wno-format-truncation
579 dnl and would spew tons of warnings otherwise.
580 AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
581 common_cflags+=" -Wno-format-truncation"
583 common_cxxflags="${common_flags}"
584 AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xgnu"], [
585 common_cxxflags+=" -Wno-format-truncation"
588 AX_APPEND_COMPILE_FLAGS([${common_cflags} -Wvla -Wbad-function-cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return], [CFLAGS])
591 AX_APPEND_COMPILE_FLAGS([${common_cxxflags} -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo], [CXXFLAGS])
594 AS_IF([test "x$enable_test_coverage" = "xyes"], [
595 AX_APPEND_COMPILE_FLAGS([-coverage], [CFLAGS])
598 dnl some distributions (such as Gentoo) have _FORTIFY_SOURCE always
599 dnl enabled. We test for this situation in order to prevent polluting
600 dnl the console with messages of macro redefinitions.
601 AX_ADD_FORTIFY_SOURCE
603 AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
604 dnl OS specific tweaks.
606 [darwin* | rhapsody*], [
607 dnl Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody.
608 dnl System headers on these systems are broken.
609 temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"`
611 SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(top_srcdir)/src/Symbols.darwin"],
613 SHLIB_VERSION_ARG="-Wc,-static-libgcc -Wl,\$(top_srcdir)/src/libsndfile-1.def"
615 AS_IF([test "x$enable_shared" = "xno"], [
618 AX_APPEND_COMPILE_FLAGS([-mstackrealign], [CFLAGS])
621 SHLIB_VERSION_ARG="-Wl,-export-symbols \$(top_srcdir)/src/Symbols.os2"
627 AS_CASE([$host_os], [linux*|kfreebsd*-gnu*|gnu*], [SHLIB_VERSION_ARG="-Wl,--version-script=\$(top_srcdir)/src/Symbols.gnu-binutils"])
629 AC_DEFINE_UNQUOTED([WIN32_TARGET_DLL], [${win32_target_dll}], [Set to 1 if windows DLL is being built.])
630 AC_DEFINE_UNQUOTED([COMPILER_IS_GCC], [${COMPILER_IS_GCC}], [Set to 1 if the compile is GNU GCC.])
632 CFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"
634 AS_IF([test "x$CFLAGS" = "x"], [
635 AC_MSG_ERROR(["Error in configure script. CFLAGS has been screwed up."])
638 HOST_TRIPLET="${host_cpu}-${host_vendor}-${host_os}"
640 AC_DEFINE_UNQUOTED([HOST_TRIPLET], [${HOST_TRIPLET}], [The host triplet of the compiled binary.])
642 AS_IF([test "$HOST_TRIPLET" = "x86_64-w64-mingw32"], [
643 OS_SPECIFIC_LINKS=" -static-libgcc $OS_SPECIFIC_LINKS"
646 WIN_RC_VERSION=`echo $PACKAGE_VERSION | $SED -e "s/pre.*//" -e "s/beta.*//" -e "s/\./,/g"`
649 AS_IF([test "x$enable_static" = "xno"], [
650 SRC_BINDIR=src/.libs/
651 TEST_BINDIR=tests/.libs/
657 dnl -------------------------------------------------------------------------------
659 AC_SUBST(HOST_TRIPLET)
661 AC_SUBST(HTML_BGCOLOUR)
662 AC_SUBST(HTML_FGCOLOUR)
664 AC_SUBST(SHLIB_VERSION_ARG)
665 AC_SUBST([SHARED_VERSION_INFO], [lt_current:lt_revision:lt_age])
666 AC_SUBST([ABI_VERSION], [abi_version_major.abi_version_minor.abi_version_patch])
667 AC_SUBST(CLEAN_VERSION)
668 AC_SUBST(VERSION_MAJOR)
671 AC_SUBST(WIN_RC_VERSION)
673 AC_SUBST(HAVE_EXTERNAL_XIPH_LIBS)
675 AC_SUBST(OS_SPECIFIC_CFLAGS)
676 AC_SUBST(OS_SPECIFIC_LINKS)
679 AC_SUBST(EXTERNAL_XIPH_CFLAGS)
680 AC_SUBST(EXTERNAL_XIPH_LIBS)
681 AC_SUBST(EXTERNAL_XIPH_REQUIRE)
682 AC_SUBST(EXTERNAL_MPEG_LIBS)
683 AC_SUBST(EXTERNAL_MPEG_REQUIRE)
684 AC_SUBST(MPG123_CFLAGS)
685 AC_SUBST(MPG123_LIBS)
686 AC_SUBST(MPEG_CFLAGS)
689 AC_SUBST(TEST_BINDIR)
692 Makefile Octave/Makefile
693 src/version-metadata.rc
694 tests/test_wrapper.sh tests/pedantic-header-test.sh
696 Scripts/build-test-tarball.mk
700 dnl ====================================================================================
702 AS_IF([test -z "$PKG_CONFIG"], [
703 AS_ECHO([" *****************************************************************"])
704 AS_ECHO([" *** The pkg-config program is missing. ***"])
705 AS_ECHO([" *** External Ogg/Vorbis libs cannot be found without it. ***"])
706 AS_ECHO([" *** http://pkg-config.freedesktop.org/wiki/ ***"])
707 AS_ECHO([" *****************************************************************"])
710 AX_RECURSIVE_EVAL([$libdir], [full_absolute_libdir])
711 AX_RECURSIVE_EVAL([$bindir], [full_absolute_bindir])
712 AX_RECURSIVE_EVAL([$pkgconfigdir], [full_absolute_pkgconfigdir])
713 AX_RECURSIVE_EVAL([$htmldir], [full_absolute_htmldir])
715 -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-=-
717 Configuration summary :
719 libsndfile version : .................. ${VERSION}
721 Host CPU : ............................ ${host_cpu}
722 Host Vendor : ......................... ${host_vendor}
723 Host OS : ............................. ${host_os}
725 CFLAGS : .............................. ${CFLAGS}
726 CXXFLAGS : ............................ ${CXXFLAGS}
727 CPPFLAGS : ............................ ${CPPFLAGS}
728 LDFLAGS : ............................. ${LDFLAGS}
730 Experimental code : ................... ${enable_experimental:-no}
731 Using ALSA in example programs : ...... ${enable_alsa:-no}
732 External Ogg/Vorbis/Opus : ............ ${enable_external_libs:-no}
733 External MPEG Lame/MPG123 : ........... ${enable_mpeg:-no}
734 Building Octave interface : ........... ${OCTAVE_BUILD}
738 C Compiler Vendor is : ................ ${ax_cv_c_compiler_vendor} (${ax_cv_c_compiler_version})
739 CXX Compiler Vendor is : .............. ${ax_cv_cxx_compiler_vendor} (${ax_cv_cxx_compiler_version})
741 Sanitizer enabled : ................... ${enable_sanitizer:-no}
743 Installation directories :
745 Library directory : ................... ${full_absolute_libdir}
746 Program directory : ................... ${full_absolute_bindir}
747 Pkgconfig directory : ................. ${full_absolute_pkgconfigdir}
748 HTML docs directory : ................. ${full_absolute_htmldir}
750 Compiling some other packages against libsndfile may require
751 the addition of '$full_absolute_pkgconfigdir' to the
752 PKG_CONFIG_PATH environment variable.
755 dnl Remove symlink created by Scripts/android-configure.sh.