blob: 06eb53d6856bb0262bd75b0b32acf0a7b1036c51 [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
18REQS="$REQS httpd php json-c"
19BUILDREQS="$BUILDREQS json-c-devel httpd-devel"
20
21# Checks for libraries.
22AC_SEARCH_LIBS([ncds_apply_rpc],[netconf], ,AC_MSG_ERROR([libnetconf not found!]))
23REQS="$REQS libnetconf"
24BUILDREQS="$BUILDREQS libnetconf-devel"
25
26# Checks for header files.
27AC_CHECK_HEADER([libnetconf.h], ,AC_MSG_ERROR([libnetconf.h not found!]))
28
29# Checks for typedefs, structures, and compiler characteristics.
30
31# Checks for library functions.
32
33AC_SUBST(RPMBUILD)
34if test -z "$RPMBUILD"; then
35 AC_MSG_WARN([Due to missing rpmbuild you will not able to generate RPM package.])
36fi
37
38AC_SUBST(REQS)
39AC_SUBST(BUILDREQS)
40
41AC_CONFIG_FILES([Makefile])
42AC_CONFIG_FILES([mod_netconf.spec])
43AC_OUTPUT