Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. |
| 3 | |
| 4 | AC_PREREQ([2.63]) |
| 5 | AC_INIT([mod_netconf], [1.0]) |
| 6 | AC_CONFIG_SRCDIR([mod_netconf.c]) |
| 7 | |
| 8 | # Checks for programs. |
| 9 | #AC_PROG_CC |
| 10 | AC_PROG_INSTALL |
| 11 | |
| 12 | # Check for rpmbuil |
| 13 | AC_CHECK_PROG(RPMBUILD, rpmbuild, rpmbuild) |
| 14 | |
| 15 | RELEASE=1 |
| 16 | AC_SUBST(RELEASE) |
| 17 | |
Tomas Cejka | 689a104 | 2013-01-16 15:08:25 +0100 | [diff] [blame^] | 18 | if test "`git show > /dev/null 2>&1;echo $?`" = "0"; then |
| 19 | RCSID="-DRCSID=\\\"\$(IDGIT)\\\"" |
| 20 | ARCSID="-DARCSID='\\\"\$(IDGIT)\\\"'" |
| 21 | else |
| 22 | RCSID="-DRCSID=\\\"\$(IDNOGIT)\\\"" |
| 23 | ARCSID="-DARCSID='\\\"\$(IDNOGIT)\\\"'" |
| 24 | fi |
| 25 | |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 26 | REQS="$REQS httpd php json-c" |
| 27 | BUILDREQS="$BUILDREQS json-c-devel httpd-devel" |
| 28 | |
| 29 | # Checks for libraries. |
| 30 | AC_SEARCH_LIBS([ncds_apply_rpc],[netconf], ,AC_MSG_ERROR([libnetconf not found!])) |
| 31 | REQS="$REQS libnetconf" |
| 32 | BUILDREQS="$BUILDREQS libnetconf-devel" |
| 33 | |
| 34 | # Checks for header files. |
| 35 | AC_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 | |
| 41 | AC_SUBST(RPMBUILD) |
| 42 | if test -z "$RPMBUILD"; then |
| 43 | AC_MSG_WARN([Due to missing rpmbuild you will not able to generate RPM package.]) |
| 44 | fi |
| 45 | |
| 46 | AC_SUBST(REQS) |
| 47 | AC_SUBST(BUILDREQS) |
Tomas Cejka | 689a104 | 2013-01-16 15:08:25 +0100 | [diff] [blame^] | 48 | AC_SUBST(CPPFLAGS) |
| 49 | AC_SUBST(RCSID) |
| 50 | AC_SUBST(ARCSID) |
Tomas Cejka | 96f4e61 | 2012-12-10 00:03:32 +0100 | [diff] [blame] | 51 | |
| 52 | AC_CONFIG_FILES([Makefile]) |
| 53 | AC_CONFIG_FILES([mod_netconf.spec]) |
| 54 | AC_OUTPUT |