File: configure.ac

package info (click to toggle)
conv-tools 20160905-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 960 kB
  • ctags: 113
  • sloc: sh: 1,350; ansic: 585; makefile: 24
file content (68 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download | duplicates (4)
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
AC_PREREQ([2.63])
AC_INIT([conv-tools], [20160905], [des@des.no], [conv-tools],
  [http://github.com/dag-erling/conv-tools])
AC_CONFIG_SRCDIR([lib/conv-tools.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])

############################################################################
#
# Toolchain
#

# C compiler and features
AC_LANG(C)
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP
AC_GNU_SOURCE
AC_C_CONST

# other programs
AC_PROG_INSTALL

############################################################################
#
# Build options
#

# Developer-friendly compiler flags
AC_ARG_ENABLE([debugging-symbols],
    AS_HELP_STRING([--enable-debugging-symbols],
	[enable debugging symbols (default is NO)]),
    [CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
AC_ARG_ENABLE([developer-warnings],
    AS_HELP_STRING([--enable-developer-warnings],
	[enable strict warnings (default is NO)]),
    [CFLAGS="${CFLAGS} -Wall -Wextra"])
AC_ARG_ENABLE([werror],
    AS_HELP_STRING([--enable-werror],
	[use -Werror (default is NO)]),
    [CFLAGS="${CFLAGS} -Werror"])

############################################################################
#
# Extra libraries
#

save_LIBS="${LIBS}"
LIBS=""
AC_SEARCH_LIBS([iconv_open], [iconv])
ICONV_LIBS="${LIBS}"
LIBS="${save_LIBS}"
AC_SUBST(ICONV_LIBS)

############################################################################
#
# Output
#

AC_CONFIG_FILES([
    Makefile
    lib/Makefile
    bin/Makefile
    bin/dirconv/Makefile
    bin/mixconv/Makefile
])
AC_OUTPUT