File: configure.ac

package info (click to toggle)
ocaml-faad 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 712 kB
  • sloc: sh: 3,262; ansic: 2,877; ml: 209; makefile: 84
file content (51 lines) | stat: -rw-r--r-- 1,244 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

# check for one particular file of the sources 
AC_INIT([ocaml-faad],[0.4.0],[savonet-users@lists.sourceforge.net])

VERSION=$PACKAGE_VERSION
AC_MSG_RESULT([configuring $PACKAGE_STRING])

AC_BASE_CHECKS()

# Include a config.h
AC_CONFIG_HEADERS([config.h:config.h.in])
# Include it
CFLAGS="$CFLAGS -I.. -DHAVE_CONFIG_H"

AC_CHECK_HEADERS([errno.h])

# Check for libfaad
FAAC_LIBS="-lfaad -lm"
FAAC_CFLAGS=""
FAAC_CPPFLAGS=""
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
CFLAGS="$CFLAGS $FAAC_CFLAGS"
LIBS="$FAAC_LIBS $LIBS"
AC_CHECK_HEADERS([neaacdec.h], [
                  AC_CHECK_FUNC([NeAACDecInit], [ac_have_faad="yes"])
])
CPPFLAGS="$ac_save_CPPFLAGS"
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
if test "$ac_have_faad" != "yes"; then
  AC_MSG_ERROR([Cannot find libfaad.])
fi
CPPFLAGS="$CPPFLAGS $FAAC_CPPFLAGS"
CFLAGS="$CFLAGS $FAAC_CFLAGS"
LIBS="$LIBS $FAAC_LIBS"

AC_CHECK_OCAML_BINDING([bytes],[],[],[1])
INC="$INC `$OCAMLFIND query bytes`"

# substitutions to perform
AC_SUBST(VERSION)
AC_SUBST(INC)

# Finally create the Makefile and samples
AC_CONFIG_FILES([Makefile],[chmod a-w Makefile])
AC_CONFIG_FILES([src/META])
AC_CONFIG_FILES([src/Makefile])
AC_OUTPUT