Make use of hardening-wrapper to enable hardening features
[debian/gsimplecal.git] / configure.ac
1 AC_PREREQ([2.65])
2 AC_INIT([gsimplecal],
3         [1.6],
4         [https://github.com/dmedvinsky/gsimplecal/issues],
5         [gsimplecal],
6         [https://github.com/dmedvinsky/gsimplecal])
7
8 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
9
10 AC_CONFIG_SRCDIR([src/gsimplecal.cpp])
11 AC_CONFIG_HEADERS([src/config.h])
12
13 # Checks for programs.
14 AC_LANG([C++])
15 AC_PROG_CXX
16 AC_PROG_INSTALL
17 PKG_PROG_PKG_CONFIG
18
19 # Checks for libraries.
20 PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
21 AC_SUBST(GTK2_CFLAGS)
22 AC_SUBST(GTK2_LIBS)
23
24 # Checks for header files.
25 AC_CHECK_HEADERS([iostream \
26                   string \
27                   sstream \
28                   fstream \
29                   vector \
30                   cstdlib \
31                   stdlib.h \
32                   sys/time.h \
33                   sys/types.h \
34                   sys/ipc.h \
35                   sys/sem.h \
36                   signal.h \
37                   limits.h])
38
39 # Checks for typedefs, structures, and compiler characteristics.
40
41 # Checks for library functions.
42 AC_CHECK_FUNCS([atexit \
43                 gettimeofday \
44                 setenv \
45                 signal \
46                 kill \
47                 semget \
48                 semctl \
49                 ftok \
50                 readlink \
51                 fork \
52                 execl])
53
54 # Checks for host
55 AC_CANONICAL_HOST
56 case $host_os in
57     *linux* | *Linux*)
58         AC_DEFINE([PROC_SELF_PATH], ["/proc/self/exe"], [Path to symlink in proc that leads to current executable.])
59         ;;
60     *bsd* | *BSD*)
61         AC_DEFINE([PROC_SELF_PATH], ["/proc/curproc/file"], [Path to symlink in proc that leads to current executable.])
62         ;;
63     *)
64         AC_MSG_ERROR([Your platform $host_os is not currently supported.
65                        Please, report this to the issue tracker.])
66         ;;
67 esac
68
69 # Flags
70 AM_CPPFLAGS="-Wall"
71 AM_LDFLAGS="-Wl,--as-needed"
72 AC_SUBST(AM_CFLAGS)
73 AC_SUBST(AM_LDFLAGS)
74
75 AC_CONFIG_FILES([Makefile
76                  doc/Makefile
77                  src/Makefile])
78
79 AC_OUTPUT