From 3aafe75eced590159c7497b6fcbe79c49002df50 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Sun, 24 Jan 2016 16:30:58 +0100 Subject: [PATCH] Change --disable-vde into --without-vde and --with-vde=PATH so that the option can also be used to specify the location of the header file and library. --- configure.ac | 66 ++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/configure.ac b/configure.ac index 2534236..c16adec 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,36 @@ do done CFLAGS="$NEWCFLAGS -g3 -O3" +# ------------------------------------------------------------------------- +# Check whether we want VDE support +# ------------------------------------------------------------------------- + +AC_ARG_WITH(vde, + AS_HELP_STRING([--with-vde=PATH],[enable vde networking (default on) when it cannot be found])) + +case "${with_vde}" in + yes | "") ;; + no) AC_DEFINE(KLH10_NET_VDE, 0, [Set to 0 to disable VDE networking]) + AC_MSG_NOTICE([Compiling without VDE support]) ;; + /*) CFLAGS="$CFLAGS -I ${withval}/include" + LDFLAGS="$LDFLAGS -L ${withval}/lib" ;; + *) AC_MSG_ERROR([bad value ${with_vde} for --with-vde]) ;; +esac + +# ------------------------------------------------------------------------- +# Check whether we want bridge support +# ------------------------------------------------------------------------- + +AC_ARG_ENABLE(bridge, + AS_HELP_STRING([--disable-bridge],[disable bridge networking])) + +case "${enable_bridge}" in + yes | "") ;; + no) AC_DEFINE(KLH10_NET_BRIDGE, 0, [Set to 0 to disable bridge networking]) + AC_MSG_NOTICE([Compiling without bridge support]) ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-bridge]) ;; +esac + # Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET @@ -166,42 +196,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]) ]) -# ------------------------------------------------------------------------- -# Check whether we want bridge support -# ------------------------------------------------------------------------- - -AC_ARG_ENABLE(bridge, - AC_HELP_STRING([--disable-bridge],[disable bridge networking]), - [ case "${enableval}" in - yes) bridge=true ;; - no) bridge=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-bridge) ;; - esac ], - [ bridge=true ] ) -if test x$bridge = xfalse -then - AC_DEFINE(KLH10_NET_BRIDGE, 0, [Set to 0 to disable bridge networking]) - echo 'Compiling without bridge support' -fi - -# ------------------------------------------------------------------------- -# Check whether we want VDE support -# ------------------------------------------------------------------------- - -AC_ARG_ENABLE(vde, - AC_HELP_STRING([--disable-vde],[disable vde networking]), - [ case "${enableval}" in - yes) vde=true ;; - no) vde=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-vde) ;; - esac ], - [ vde=true ] ) -if test x$vde = xfalse -then - AC_DEFINE(KLH10_NET_VDE, 0, [Set to 0 to disable VDE networking]) - echo 'Compiling without VDE support' -fi - # ------------------------------------------------------------------------- # Check large file support and the sizes of related types # -------------------------------------------------------------------------