blob: 2d122afb28cb43aeeb22a038c1e7999f14e6766e [file] [log] [blame]
Tomas Cejka96f4e612012-12-10 00:03:32 +01001# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.63])
5AC_INIT([mod_netconf], [1.0])
6AC_CONFIG_SRCDIR([mod_netconf.c])
7
8# Checks for programs.
9#AC_PROG_CC
10AC_PROG_INSTALL
11
12# Check for rpmbuil
13AC_CHECK_PROG(RPMBUILD, rpmbuild, rpmbuild)
14
15RELEASE=1
16AC_SUBST(RELEASE)
17
Tomas Cejka689a1042013-01-16 15:08:25 +010018if test "`git show > /dev/null 2>&1;echo $?`" = "0"; then
19 RCSID="-DRCSID=\\\"\$(IDGIT)\\\""
20 ARCSID="-DARCSID='\\\"\$(IDGIT)\\\"'"
21else
22 RCSID="-DRCSID=\\\"\$(IDNOGIT)\\\""
23 ARCSID="-DARCSID='\\\"\$(IDNOGIT)\\\"'"
24fi
25
Tomas Cejka96f4e612012-12-10 00:03:32 +010026REQS="$REQS httpd php json-c"
27BUILDREQS="$BUILDREQS json-c-devel httpd-devel"
28
29# Checks for libraries.
30AC_SEARCH_LIBS([ncds_apply_rpc],[netconf], ,AC_MSG_ERROR([libnetconf not found!]))
31REQS="$REQS libnetconf"
32BUILDREQS="$BUILDREQS libnetconf-devel"
33
34# Checks for header files.
35AC_CHECK_HEADER([libnetconf.h], ,AC_MSG_ERROR([libnetconf.h not found!]))
36
37# Checks for typedefs, structures, and compiler characteristics.
38
39# Checks for library functions.
40
41AC_SUBST(RPMBUILD)
42if test -z "$RPMBUILD"; then
43 AC_MSG_WARN([Due to missing rpmbuild you will not able to generate RPM package.])
44fi
45
46AC_SUBST(REQS)
47AC_SUBST(BUILDREQS)
Tomas Cejka689a1042013-01-16 15:08:25 +010048AC_SUBST(CPPFLAGS)
49AC_SUBST(RCSID)
50AC_SUBST(ARCSID)
Tomas Cejka96f4e612012-12-10 00:03:32 +010051
52AC_CONFIG_FILES([Makefile])
53AC_CONFIG_FILES([mod_netconf.spec])
54AC_OUTPUT