1 AC_INIT([backuppcd], 0.1.3)
2 AM_INIT_AUTOMAKE([1.9 foreign])
3 AC_CONFIG_HEADER(config.h)
5 dnl Checks for programs.
13 AC_CHECK_TOOL(AR, ar, true)
15 AC_CHECK_HEADERS(stdlib.h string.h unistd.h time.h sys/time.h sys/types.h signal.h syslog.h sys/select.h netinet/in.h arpa/inet.h sys/socket.h ssl.h openssl/ssl.h ssl/ssl.h fcntl.h dirent.h ctype.h assert.h endian.h stdarg.h utime.h fnmatch.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h sys/resource.h limits.h)
17 AC_CHECK_FUNCS(sysinfo openlog syslog setsid fork fcntl stat lstat lchown symlink readlink signal getenv utime statfs getmntinfo setpriority)
18 AC_REPLACE_FUNCS(link)
20 dnl Large file support
25 PKG_CHECK_MODULES([SSL], [openssl])
27 AC_ARG_WITH(masterpw, AC_HELP_STRING([--with-masterpw], [Enable support for a hard-coded master password]), [ masterpw=$withval ], [ masterpw=no ])
28 if test "$masterpw" != "no"; then
29 if test "$masterpw" = "yes"; then
30 AC_MSG_ERROR([Master password must be specified on the command line.])
32 AC_DEFINE_UNQUOTED(BPC_CONF_MASTER_PASSWORD, "$masterpw", [Define to the master password])
35 AC_ARG_WITH(updateurl, AC_HELP_STRING([--with-updateurl], [Enable support for a hard-coded update URL]), [ updateurl="$withval" ], [ updateurl=no ])
36 if test "$updateurl" != "no"; then
37 if test "$updateurl" = "yes"; then
38 AC_MSG_ERROR([URL must be specified on the command line.])
40 AC_DEFINE_UNQUOTED(BPC_CONF_UPDATEURL, "$updateurl", [Define to the URL to update against])
43 AC_ARG_WITH(notifyserv, AC_HELP_STRING([--with-notifyserv], [Enable support for a hard-coded notification server]), [ notifyserv="$withval" ], [ notifyserv=no ])
44 if test "$notifyserv" != "no"; then
45 if test "$notifyserv" = "yes"; then
46 AC_MSG_ERROR([Notification server must be specified on the command line.])
48 AC_DEFINE_UNQUOTED(BPC_CONF_NOTIFYSERV, "$notifyserv", [Define to the server to send host notifications to])
51 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging support.]), [ debugenabled=$enableval ], [ debugenabled=no ])
52 if test "$debugenabled" = "no"; then
53 AC_DEFINE(NDEBUG, [1], [Define if you wish to disable debugging support])
55 AC_DEFINE(DEBUG, [1], [Define if you wish to enable debugging support])
59 AC_DEFINE(ENDIAN_UNKNOWN, [1], [Define this to 1 if you do not know what endian-ness your platform is.])
62 AC_OUTPUT(Makefile lib/Makefile)