forked from JuMi2006/ebusd
-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
65 lines (52 loc) · 2.15 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
AC_PREREQ([2.63])
AC_INIT([ebusd], m4_esyscmd_s([cat VERSION]), [ebusd@ebusd.eu], [ebusd], [https://github.com/john30/ebusd])
AC_CONFIG_AUX_DIR([build])
if test -z $CXXFLAGS;
then CXXFLAGS='-g -O2'
fi
AC_PROG_CXX
AC_CHECK_HEADERS([arpa/inet.h \
dirent.h \
fcntl.h \
netdb.h \
poll.h \
pthread.h \
sys/ioctl.h \
sys/select.h \
sys/time.h \
time.h \
termios.h])
AC_CHECK_LIB([pthread], [pthread_setname_np],
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], [1], [Define to 1 if pthread has pthread_setname_np.]),
AC_MSG_RESULT([Could not find pthread_setname_np in pthread.]))
AC_CHECK_FUNC([pselect], [AC_DEFINE(HAVE_PSELECT, [1], [Define to 1 if pselect() is available.])])
AC_CHECK_FUNC([ppoll], [AC_DEFINE(HAVE_PPOLL, [1], [Define to 1 if ppoll() is available.])])
AC_CHECK_FUNC([argp_parse], [have_argp=yes], AC_CHECK_LIB([argp], [argp_parse], [have_argp=yes; LIBS="-largp $LIBS"], [have_argp=no]))
if test "x$have_argp" = "xyes"; then
AC_CHECK_HEADER([argp.h], AC_DEFINE([HAVE_ARGP_H], [1], [Define to 1 if argp.h is available.]), AC_MSG_ERROR([argp.h not found]))
else
AC_MSG_ERROR([argp library not found. argp-standalone required.])
fi
AC_CONFIG_SRCDIR([src/ebusd/main.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
docs/Makefile
src/lib/utils/Makefile
src/lib/ebus/Makefile
src/lib/ebus/test/Makefile
src/ebusd/Makefile
src/tools/Makefile])
AC_DEFINE_UNQUOTED(PACKAGE_PIDFILE, LOCALSTATEDIR "/run/" PACKAGE ".pid", [The path and name of the PID file.])
AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, LOCALSTATEDIR "/log/" PACKAGE ".log", [The path and name of the log file.])
AC_DEFINE_UNQUOTED(PACKAGE_CONFIGPATH, SYSCONFDIR "/" PACKAGE, [The default path of the configuration files.])
AC_CHECK_PROGS([HAVE_DOXYGEN], [doxygen], [])
if test -z "$HAVE_DOXYGEN";
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support.])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$HAVE_DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_RANLIB
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_OUTPUT