-
Notifications
You must be signed in to change notification settings - Fork 20
/
configure.ac
69 lines (53 loc) · 1.74 KB
/
configure.ac
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([colibri-core],[2.5.9],[proycon@anaproy.nl])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX_17])
# Checks for programs.
AC_PROG_CXX( [g++] )
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_17
AC_CHECK_HEADERS([bzlib.h],
[LIBS="$LIBS -lbz2"],
[AC_MSG_ERROR([libbz2-dev not found])] )
# use libtool
LT_INIT
AC_SUBST([LIBTOOL_DEPS])
# when running tests, use CXX
# Checks for libraries.
if test $prefix = "NONE"; then
prefix="$ac_default_prefix"
fi
PKG_PROG_PKG_CONFIG
# Checks for timbl library.
# inspired by feh-1.3.4/configure.ac. Tnx Tom Gilbert and feh hackers.
# ugly hack when PKG_CONFIG_PATH isn't defined.
# couldn't get it to work otherwise
if test "x$PKG_CONFIG_PATH" = x; then
export PKG_CONFIG_PATH=""
fi
AC_ARG_WITH(folia-path,
[ --with-folia-path=DIR use libfolia installed in <DIR>],
[PKG_CONFIG_PATH="$withval/lib/pkgconfig:$PKG_CONFIG_PATH"],
[PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"])
AC_ARG_WITH([folia], AS_HELP_STRING([--with-folia], [Build with FoLiA support (default: disabled)]))
AS_IF([test "x$with_folia" = "xyes"], [
AC_MSG_NOTICE( [pkg-config search path: $PKG_CONFIG_PATH] )
PKG_CHECK_MODULES([folia],[folia >= 2.17])
CXXFLAGS="$CXXFLAGS $folia_CFLAGS"
LIBS="$folia_LIBS $LIBS"
AC_DEFINE([WITHFOLIA],[1],[Compile with libfolia support])
])
# Checks for library functions.
AC_CONFIG_FILES([
colibri-core.pc
Makefile
src/Makefile
include/Makefile
scripts/Makefile
])
AC_OUTPUT