2 # Process this file with autoconf to produce a configure script.
7 AM_INIT_AUTOMAKE(squishyball, 20140211, [vorbis-dev@xiph.org])
8 AC_CONFIG_FILES([Makefile])
9 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11 # Checks for programs.
14 # Checks for libraries.
16 PKG_CHECK_MODULES([opusfile], [opusfile])
17 PKG_CHECK_MODULES([vorbisfile], [vorbisfile])
18 PKG_CHECK_MODULES([FLAC], [flac >= 0.8.0])
19 PKG_CHECK_MODULES([ao], [ao > 1.0.0])
20 AC_CHECK_LIB([ncurses], [initscr],,[AC_MSG_ERROR([ncurses required!])])
21 AC_CHECK_LIB([ncurses], [_nc_tinfo_fkeysf], USE_FKEYSF=1, USE_FKEYSF=0)
22 AC_CHECK_LIB([m], [cos])
23 AC_CHECK_LIB([pthread], [pthread_create])
25 # Checks for header files.
27 AC_CHECK_HEADERS([stdlib.h string.h])
28 AC_CHECK_HEADERS([vorbis/vorbisfile.h])
29 AC_CHECK_HEADERS([opus/opusfile.h])
30 AC_CHECK_HEADERS([ao/ao.h])
31 AC_CHECK_HEADERS([FLAC/stream_decoder.h])
33 # Checks for typedefs, structures, and compiler characteristics.
36 if test -z "$GCC"; then
40 CFLAGS="-O2 -w -signed"
41 PROFILE="-p -g3 -O2 -signed"
45 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
46 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
57 DEBUG="-g -Wall -fsigned-char"
58 CFLAGS="-O2 -fsigned-char -ffast-math"
59 PROFILE="-Wall -W -pg -g -O2 -fsigned-char -ffast-math"
62 DEBUG="-g -Wall -fsigned-char"
63 CFLAGS="-O2 -fsigned-char"
64 PROFILE="-pg -g -O2 -fsigned-char"
67 DEBUG="-fno-common -g -Wall -fsigned-char"
68 CFLAGS="-fno-common -O2 -Wall -fsigned-char -ffast-math"
69 PROFILE="-fno-common -O2 -Wall -pg -g -fsigned-char -ffast-math"
72 DEBUG="-g -Wall -fsigned-char"
73 CFLAGS="-O2 -fsigned-char -ffast-math"
74 PROFILE="-O2 -g -pg -fsigned-char -ffast-math"
79 COMMON_FLAGS="$cflags_save $vorbisfile_CFLAGS $opusfile_CFLAGS $ao_CFLAGS $FLAC_CFLAGS -DUSE_FKEYSF=$USE_FKEYSF"
80 CFLAGS="$CFLAGS -DVERSION='\"$VERSION\"' $COMMON_FLAGS"
81 DEBUG="$DEBUG -DVERSION='\\\"$VERSION\\\"' $COMMON_FLAGS"
82 PROFILE="$PROFILE -DVERSION='\\\"$VERSION\\\"' $COMMON_FLAGS"
83 LIBS="$LIBS $vorbisfile_LIBS $opusfile_LIBS $ao_LIBS $FLAC_LIBS"