misc/libtremor/tremor/configure.in
author koda
Tue, 11 Jun 2013 10:45:34 +0200
changeset 9192 a8a717cf4a66
parent 7849 a12155461b34
permissions -rw-r--r--
use BUILD_SHARED_LIBS to control whether a library is shared or static, make our bundled physfs library check for this configuration
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     1
dnl Process this file with autoconf to produce a configure script
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     2
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     3
dnl ------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     4
dnl Initialization and Versioning
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     5
dnl ------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     6
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     7
AC_INIT(mdct.c)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     8
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
     9
AC_CANONICAL_HOST
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    10
AC_CANONICAL_TARGET
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    11
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    12
AM_CONFIG_HEADER([config.h])
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    13
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    14
AM_INIT_AUTOMAKE(libvorbisidec,1.2.0)
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    15
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    16
dnl Library versioning
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    17
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    18
V_LIB_CURRENT=1
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    19
V_LIB_REVISION=2
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    20
V_LIB_AGE=0
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    21
AC_SUBST(V_LIB_CURRENT)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    22
AC_SUBST(V_LIB_REVISION)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    23
AC_SUBST(V_LIB_AGE)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    24
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    25
dnl --------------------------------------------------  
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    26
dnl Check for programs
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    27
dnl --------------------------------------------------  
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    28
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    29
dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    30
dnl if $CFLAGS is blank
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    31
cflags_save="$CFLAGS"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    32
AC_PROG_CC
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    33
AC_PROG_CPP
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    34
CFLAGS="$cflags_save"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    35
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    36
AM_PROG_LIBTOOL
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    37
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    38
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    39
dnl Set build flags based on environment
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    40
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    41
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    42
dnl Set some target options
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    43
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    44
cflags_save="$CFLAGS"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    45
ldflags_save="$LDFLAGS"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    46
if test -z "$GCC"; then
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    47
        case $host in 
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    48
        arm-*-*)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    49
                DEBUG="-g -D_ARM_ASSEM_" 
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    50
                CFLAGS="-O -D_ARM_ASSEM_"
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    51
                PROFILE="-p -g -O -D_ARM_ASSEM_" ;;
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    52
        *)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    53
                DEBUG="-g"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    54
                CFLAGS="-O"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    55
                PROFILE="-g -p" ;;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    56
        esac
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    57
else
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    58
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    59
        case $host in 
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    60
        arm-*-*)
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    61
                DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -D_ARM_ASSEM_"
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    62
                CFLAGS="-O2 -D_ARM_ASSEM_ -fsigned-char"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    63
                PROFILE="-W -pg -g -O2 -D_ARM_ASSEM_ -fsigned-char -fno-inline-functions";;
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    64
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    65
        *)
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    66
                DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    67
                CFLAGS="-O2 -Wall -fsigned-char"
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    68
                PROFILE="-Wall -pg -g -O2 -fsigned-char -fno-inline-functions";;
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    69
        esac
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    70
fi
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    71
CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    72
LDFLAGS="$LDFLAGS $ldflags_save"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    73
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    74
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    75
# Test whenever ld supports -version-script
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    76
AC_PROG_LD
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    77
AC_PROG_LD_GNU
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    78
if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    79
   SHLIB_VERSION_ARG="Wl,--version-script=Version_script"
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    80
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    81
   dnl Set extra linker options
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    82
   case "$target_os" in
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    83
  linux* | solaris* )
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    84
    SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    85
    ;;
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    86
  *)
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    87
    ;;
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    88
   esac
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    89
   LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG"
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    90
fi
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
    91
5170
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    92
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    93
dnl Options 
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    94
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    95
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    96
AC_ARG_ENABLE(
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    97
   low-accuracy,
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    98
   [  --enable-low-accuracy   enable 32 bit only multiply operations],
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
    99
   CFLAGS="$CFLAGS -D_LOW_ACCURACY_"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   100
)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   101
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   102
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   103
dnl Check for headers
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   104
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   105
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   106
AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   107
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   108
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   109
dnl Check for typedefs, structures, etc
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   110
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   111
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   112
dnl none
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   113
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   114
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   115
dnl Check for library functions
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   116
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   117
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   118
AC_FUNC_ALLOCA
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   119
AC_FUNC_MEMCMP
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   120
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   121
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   122
dnl Do substitutions
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   123
dnl --------------------------------------------------
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   124
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   125
LIBS="$LIBS"
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   126
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   127
AC_SUBST(LIBS)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   128
AC_SUBST(DEBUG)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   129
AC_SUBST(PROFILE)
f7e49eff3708 add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff changeset
   130
7849
a12155461b34 revert r767d3c4153a1 this tremor implementation is buggy
koda
parents: 7697
diff changeset
   131
AC_OUTPUT(Makefile Version_script)