Skip to content

Commit 8d8e035

Browse files
author
Sebastiano Merlino
committed
Modified configure.ac to eliminate build-dependency on pkg-config
1 parent 4cbfc1f commit 8d8e035

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Fri Jul 17 21:38:54 2015 +0000
2+
Removed build dependency on pkg-config
3+
14
Wed Apr 15 01:40:11 2015 +0000
25
Support build on MacOsX
36
Improved support for CI on travis

configure.ac

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
AC_PREREQ(2.57)
2323
m4_define([libhttpserver_MAJOR_VERSION],[0])dnl
2424
m4_define([libhttpserver_MINOR_VERSION],[9])dnl
25-
m4_define([libhttpserver_REVISION],[0])dnl
25+
m4_define([libhttpserver_REVISION],[1])dnl
2626
m4_define([libhttpserver_PKG_VERSION],[libhttpserver_MAJOR_VERSION.libhttpserver_MINOR_VERSION.libhttpserver_REVISION])dnl
2727
m4_define([libhttpserver_LDF_VERSION],[libhttpserver_MAJOR_VERSION:libhttpserver_MINOR_VERSION:libhttpserver_REVISION])dnl
2828
AC_INIT([libhttpserver], libhttpserver_PKG_VERSION, [electrictwister2000@gmail.com])
@@ -40,6 +40,8 @@ CXXFLAGS=$OLD_CXXFLAGS
4040
AC_LANG([C++])
4141
AC_SYS_LARGEFILE
4242

43+
native_srcdir=$srcdir
44+
4345
AC_MSG_CHECKING([whether it is possible to compile in the same directory])
4446
AC_ARG_ENABLE([same-directory-build],
4547
[AS_HELP_STRING([--enable-same-directory-build],
@@ -58,6 +60,7 @@ case "$host" in
5860
*-mingw*)
5961
NETWORK_HEADER="winsock2.h"
6062
REGEX_LIBS="-lregex -lpthread -no-undefined"
63+
native_srcdir=$(cd $srcdir; pwd -W)
6164
;;
6265
*-cygwin*)
6366
NETWORK_HEADER="winsock2.h"
@@ -85,7 +88,25 @@ AC_CHECK_HEADER([signal.h],[],[AC_MSG_ERROR("signal.h not found")])
8588
AC_CHECK_HEADER([gnutls/gnutls.h],[have_gnutls="yes"],[AC_MSG_WARN("gnutls/gnutls.h not found. TLS will be disabled"); have_gnutls="no"])
8689

8790
# Checks for libmicrohttpd
88-
PKG_CHECK_MODULES([LIBMICROHTTPD],[libmicrohttpd >= 0.9.37],[],[AC_MSG_ERROR("libmicrohttpd not present or too old - install libmicrohttpd >= 0.9.37")])
91+
AC_CHECK_HEADER([microhttpd.h],
92+
AC_CHECK_LIB([microhttpd], [MHD_get_fdset2],
93+
[AC_MSG_CHECKING([for libmicrohttpd >= 0.9.37])
94+
AC_COMPILE_IFELSE(
95+
[AC_LANG_SOURCE([
96+
#include <microhttpd.h>
97+
#if (MHD_VERSION < 0x0093700)
98+
#error needs at least version 0.9.37
99+
#endif
100+
int main () { return 0; }
101+
])],
102+
[],
103+
[AC_MSG_ERROR("libmicrohttpd is too old - install libmicrohttpd >= 0.9.37")]
104+
)
105+
],
106+
[AC_MSG_ERROR(["libmicrohttpd not found"])]
107+
),
108+
[AC_MSG_ERROR(["microhttpd.h not found"])]
109+
)
89110

90111
CXXFLAGS="-DHTTPSERVER_COMPILATION -D_REENTRANT $LIBMICROHTTPD_CFLAGS $CXXFLAGS"
91112
LDFLAGS="$LIBMICROHTTPD_LIBS $REGEX_LIBS $LD_FLAGS"

debian/changelog.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
libhttpserver (0.9.1) unstable; urgency=low
2+
* Eliminated build dependency on pkg-config
3+
4+
-- Sebastiano Merlino <electrictwister2000@gmail.com> Fri, 17 Jul 2015 21:38:54 +0000
5+
16
libhttpserver (0.9.0) unstable; urgency=low
27
* Support build on MacOsX
38
* Improved support for CI on travis

0 commit comments

Comments
 (0)