Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / squishyball / configure.ac
blob647b937c79d30184a6d0f741298faf204baa5dca
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 cflags_save="$CFLAGS"
5 AC_PREREQ(2.57)
6 AC_INIT(main.c)
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.
12 AC_PROG_CC
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.
26 AC_HEADER_STDC
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.
34 AC_C_CONST
36 if test -z "$GCC"; then
37         case $host in 
38         *-*-irix*)
39                 DEBUG="-g -signed" 
40                 CFLAGS="-O2 -w -signed"
41                 PROFILE="-p -g3 -O2 -signed"
42                 ;;
43         sparc-sun-solaris*)
44                 DEBUG="-v -g"
45                 CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
46                 PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
47                 ;;
48         *)
49                 DEBUG="-g"
50                 CFLAGS="-O"
51                 PROFILE="-g -p" 
52                 ;;
53         esac
54 else
55         case $host in 
56         *-*-linux*)
57                 DEBUG="-g -Wall -fsigned-char"
58                 CFLAGS="-O2 -fsigned-char -ffast-math"
59                 PROFILE="-Wall -W -pg -g -O2 -fsigned-char -ffast-math"
60                 ;;
61         sparc-sun-*)
62                 DEBUG="-g -Wall -fsigned-char"
63                 CFLAGS="-O2 -fsigned-char"
64                 PROFILE="-pg -g -O2 -fsigned-char" 
65                 ;;
66         *-*-darwin*)
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"
70                 ;;
71         *)
72                 DEBUG="-g -Wall -fsigned-char"
73                 CFLAGS="-O2 -fsigned-char -ffast-math"
74                 PROFILE="-O2 -g -pg -fsigned-char -ffast-math" 
75                 ;;
76         esac
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"
84 AC_SUBST(DEBUG)
85 AC_SUBST(PROFILE)
87 AC_OUTPUT