diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 63c9e5531..95e60b62f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -70,6 +70,9 @@ DEFAULT_INTERFACE="\"eth0\"" | |||
70 | 70 | ||
71 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" | 71 | funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo" |
72 | 72 | ||
73 | # Srcdir in a form that native compiler understands (i.e. DOS path on W32) | ||
74 | native_srcdir=$srcdir | ||
75 | |||
73 | # Check system type | 76 | # Check system type |
74 | case "$host_os" in | 77 | case "$host_os" in |
75 | *darwin* | *rhapsody* | *macosx*) | 78 | *darwin* | *rhapsody* | *macosx*) |
@@ -161,6 +164,7 @@ netbsd*) | |||
161 | DLLDIR=bin | 164 | DLLDIR=bin |
162 | UNIXONLY="" | 165 | UNIXONLY="" |
163 | funcstocheck="" | 166 | funcstocheck="" |
167 | native_srcdir=$(cd $srcdir; pwd -W) | ||
164 | ;; | 168 | ;; |
165 | gnu*) | 169 | gnu*) |
166 | AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system]) | 170 | AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system]) |
@@ -617,15 +621,15 @@ AC_ARG_WITH(microhttpd, | |||
617 | AC_CHECK_LIB([microhttpd], [MHD_start_daemon], | 621 | AC_CHECK_LIB([microhttpd], [MHD_start_daemon], |
618 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) | 622 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) |
619 | AC_RUN_IFELSE([ | 623 | AC_RUN_IFELSE([ |
620 | #include "$srcdir/src/include/platform.h" | 624 | #include "$native_srcdir/src/include/platform.h" |
621 | #include <microhttpd.h> | 625 | #include <microhttpd.h> |
622 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } | 626 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } |
623 | ], [ | 627 | ], [ |
624 | AC_MSG_RESULT(ok) | 628 | AC_MSG_RESULT(ok) |
625 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), | 629 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), |
626 | [],[#include "$srcdir/src/include/platform.h" | 630 | [],[#include "$native_srcdir/src/include/platform.h" |
627 | #include <microhttpd.h>]),, | 631 | #include <microhttpd.h>]),, |
628 | [#include "$srcdir/src/include/platform.h"]) | 632 | [#include "$native_srcdir/src/include/platform.h"]) |
629 | ;; | 633 | ;; |
630 | *) | 634 | *) |
631 | LDFLAGS="-L$with_microhttpd/lib $LDFLAGS" | 635 | LDFLAGS="-L$with_microhttpd/lib $LDFLAGS" |
@@ -636,15 +640,15 @@ AC_ARG_WITH(microhttpd, | |||
636 | EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH" | 640 | EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH" |
637 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) | 641 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) |
638 | AC_RUN_IFELSE([ | 642 | AC_RUN_IFELSE([ |
639 | #include "$srcdir/src/include/platform.h" | 643 | #include "$native_srcdir/src/include/platform.h" |
640 | #include <microhttpd.h> | 644 | #include <microhttpd.h> |
641 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } | 645 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } |
642 | ], [ | 646 | ], [ |
643 | AC_MSG_RESULT(ok) | 647 | AC_MSG_RESULT(ok) |
644 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), | 648 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), |
645 | [],[#include "$srcdir/src/include/platform.h" | 649 | [],[#include "$native_srcdir/src/include/platform.h" |
646 | #include <microhttpd.h>]),, | 650 | #include <microhttpd.h>]),, |
647 | [#include "$srcdir/src/include/platform.h"]) | 651 | [#include "$native_srcdir/src/include/platform.h"]) |
648 | ;; | 652 | ;; |
649 | esac | 653 | esac |
650 | ], | 654 | ], |
@@ -654,15 +658,15 @@ AC_ARG_WITH(microhttpd, | |||
654 | AC_CHECK_LIB([microhttpd], [MHD_start_daemon], | 658 | AC_CHECK_LIB([microhttpd], [MHD_start_daemon], |
655 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) | 659 | [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18]) |
656 | AC_RUN_IFELSE([ | 660 | AC_RUN_IFELSE([ |
657 | #include "$srcdir/src/include/platform.h" | 661 | #include "$native_srcdir/src/include/platform.h" |
658 | #include <microhttpd.h> | 662 | #include <microhttpd.h> |
659 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } | 663 | int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; } |
660 | ], [ | 664 | ], [ |
661 | AC_MSG_RESULT(ok) | 665 | AC_MSG_RESULT(ok) |
662 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), | 666 | lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]), |
663 | [],[#include "$srcdir/src/include/platform.h" | 667 | [],[#include "$native_srcdir/src/include/platform.h" |
664 | #include <microhttpd.h>]),, | 668 | #include <microhttpd.h>]),, |
665 | [#include "$srcdir/src/include/platform.h"])]) | 669 | [#include "$native_srcdir/src/include/platform.h"])]) |
666 | AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) | 670 | AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1) |
667 | AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) | 671 | AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd]) |
668 | 672 | ||