2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([irreco-backend-irtrans], [0.0.1])
7 AC_CONFIG_SRCDIR([src/irtrans_plugin.c])
8 AC_CONFIG_HEADER([config.h])
11 # Checks for programs.
15 AC_PROG_INTLTOOL([0.23])
19 AC_ARG_ENABLE([debug],
20 [AC_HELP_STRING([--enable-debug=ARG],
21 [Enable / disable debugging. Disabled by default])],
22 [enable_debug=$enableval],
24 AS_IF( [test "$enable_debug" != "yes"], [enable_debug=no])
25 AS_IF( [test "$enable_debug" = "yes"],
26 [CFLAGS="$CFLAGS -O0 -Wall -Werror -std=c99 -pedantic -ggdb -DDEBUG"],
27 [CFLAGS="$CFLAGS -O2 -Wall -Werror -std=c99 -pedantic"])
28 AC_SUBST(enable_debug)
32 #AC_ARG_WITH([irtrans],
33 # [AS_HELP_STRING([--with-irtrans=DIR],
34 # [Location of IRTrans shared library])],
35 # [irtrans_dir=$withval],
38 #PKG_CHECK_MODULES(IRTRANS_SHLIB, irtrans_shlib )
39 #irtrans_dir=`$PKG_CONFIG irtrans_shlib --variable=irtrans_header_dir`
41 #AC_MSG_CHECKING([for IRTrans])
42 #AS_IF( [test "x${irtrans_dir}" = "x"],
44 # ["IRTrans lib location not set ${irtrans_dir}. Use --with-irtrans=DIR"])])
45 #AS_IF( [! test -d "${irtrans_dir}"],
47 # ["IRTrans lib directory ${irtrans_dir} does not exists.])])
49 #irtrans_dir=`readlink -f "$irtrans_dir"`
50 #AC_MSG_RESULT([${irtrans_dir}])
51 #IRTRANS_LIBS="-L${irtrans_dir} -lIRTrans"
52 #IRTRANS_CFLAGS="-DLINUX -I${irtrans_dir} -fpic"
54 PKG_CHECK_MODULES(IRTRANS, irtrans_shlib)
55 AC_SUBST(IRTRANS_LIBS)
56 AC_SUBST(IRTRANS_CFLAGS)
59 # Backend dependencies
60 PKG_CHECK_MODULES(IRRECO, irreco)
62 AC_SUBST(IRRECO_CFLAGS)
65 # Backend install directory.
66 irreco_backend_dir=`$PKG_CONFIG irreco --variable=backenddir`
67 AC_SUBST(irreco_backend_dir)
68 AC_DEFINE_UNQUOTED([IRRECO_BACKEND_DIR], "${irreco_backend_dir}", \
72 AC_CONFIG_FILES([Makefile