summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Bar-Lev <alon.barlev@gmail.com>2012-03-26 23:26:36 +0200
committerDavid Sommerseth <davids@redhat.com>2012-03-28 10:50:52 +0200
commit7cacdfd4b7f221139e0d2a0334f1f1cd8f2a1b75 (patch)
treebc9ff3ee2926893518600419eb13edde149aff82
parent2a7448912efbba7a246f481566117d6b8f6341c1 (diff)
downloadopenvpn-7cacdfd4b7f221139e0d2a0334f1f1cd8f2a1b75.tar.gz
openvpn-7cacdfd4b7f221139e0d2a0334f1f1cd8f2a1b75.tar.xz
openvpn-7cacdfd4b7f221139e0d2a0334f1f1cd8f2a1b75.zip
build: tap: search for tap header
Windows and solaris has something in common, in both the tap header is external. So make the Windows tap-windows.h search common to all platform. Display an error if we cannot find tap header. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r--configure.ac32
-rw-r--r--src/openvpn/Makefile.am2
2 files changed, 17 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index b0dcdb7..d217343 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,11 +365,9 @@ AC_CHECK_HEADERS([ \
AC_CHECK_HEADERS([ \
sys/time.h sys/un.h sys/ioctl.h sys/stat.h \
sys/mman.h sys/file.h \
- unistd.h signal.h libgen.h \
+ unistd.h signal.h libgen.h stropts.h \
syslog.h pwd.h grp.h \
- net/if_tun.h net/tun/if_tun.h stropts.h \
- sys/sockio.h \
- sys/uio.h linux/if_tun.h linux/sockios.h \
+ sys/sockio.h sys/uio.h linux/sockios.h \
linux/types.h sys/poll.h sys/epoll.h err.h \
])
@@ -586,6 +584,20 @@ else
fi
LIBS="${old_LIBS}"
+AC_ARG_VAR([TAP_CFLAGS], [C compiler flags for tap])
+old_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} ${TAP_CFLAGS}"
+AC_CHECK_HEADERS(
+ [ \
+ net/if_tun.h net/tun/if_tun.h \
+ linux/if_tun.h \
+ tap-windows.h \
+ ],
+ [have_tap_header="yes"]
+)
+CFLAGS="${old_CFLAGS}"
+test "${have_tap_header}" = "yes" || AC_MSG_ERROR([no tap header could be found])
+
AC_CHECK_LIB(
[selinux],
[setcon],
@@ -672,18 +684,6 @@ PKG_CHECK_MODULES(
)]
)
-AC_ARG_VAR([TAP_WINDOWS_CFLAGS], [C compiler flags for TAP-Windows])
-if test "${WIN32}" = "yes"; then
- old_CFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} ${TAP_WINDOWS_CFLAGS}"
- AC_CHECK_HEADERS(
- [tap-windows.h],
- ,
- [AC_MSG_ERROR([tap-windows.h is required but missing])]
- )
- CFLAGS="${old_CFLAGS}"
-fi
-
if test "${have_openssl_crypto}" = "yes"; then
saved_CFLAGS="${CFLAGS}"
saved_LIBS="${LIBS}"
diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am
index 1410021..01ff732 100644
--- a/src/openvpn/Makefile.am
+++ b/src/openvpn/Makefile.am
@@ -22,7 +22,7 @@ INCLUDES = \
-I$(top_srcdir)/src/compat
AM_CFLAGS = \
- $(TAP_WINDOWS_CFLAGS) \
+ $(TAP_CFLAGS) \
$(OPTIONAL_CRYPTO_CFLAGS) \
$(OPTIONAL_LZO_CFLAGS) \
$(OPTIONAL_PKCS11_HELPER_CFLAGS)