aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 3e859ea76e6a3d96c50075f9744425ee28c84d12 (plain)
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
70
71
# This file is part of NSsync -*- autoconf -*-
# Copyright (C) 2011-2017 Sergey Poznyakoff
#
# NSsync is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# NSsync is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NSsync.  If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ(2.63)
AC_INIT([nssync], 1.1.92, [gray+nssync@gnu.org.ua], [],
        [http://www.gnu.org.ua/software/nssync])
AC_CONFIG_SRCDIR([src/nssync.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.11 gnu tar-ustar dist-xz std-options silent-rules])
AC_CONFIG_LIBOBJ_DIR([src])

# Enable silent rules by default:
AM_SILENT_RULES([yes])

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC

# Checks for library functions.
WD_CHECK_LIB(mysqlclient, 
             mysql_real_connect, 
	     [-lm],
             [:],
	     [ AC_MSG_FAILURE([The required library libmysqlclient is not found or is unusable]) ],
             [/usr/lib/mysql /usr/local/lib/mysql])
LIBS="$LIBS $wd_cv_lib_mysqlclient"

AC_CHECK_LIB([microhttpd],[MHD_start_daemon])
AM_CONDITIONAL([COND_MICROHTTPD],
 [test "$ac_cv_lib_microhttpd_MHD_start_daemon" = yes])

if test "$ac_cv_lib_microhttpd_MHD_start_daemon" = yes; then
  AC_CHECK_LIB(wrap, main,
               [LIBS="$LIBS -lwrap"],
	       [AC_MSG_ERROR([Required library libwrap not found])])
  AC_CHECK_LIB(nsl, main)
  AC_CHECK_HEADERS(tcpd.h,,
                   [AC_MSG_ERROR([Required header tcpd.h not found])])
fi									 
 
# Grecs subsystem

GRECS_SETUP(grecs, [getopt git2chg parser-bind syntax-doc sockaddr-list json tree-api],
            [$(top_srcdir)/src/pp-setup])

RUNCAP_SETUP([runcap],[static])
	    
AC_CONFIG_FILES([Makefile
		 src/Makefile
		 doc/Makefile])
		 
AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.