chiark / gitweb /
tripe-admin manpage: Generate a command and message summary.
[tripe] / configure.in
index 6163a8d87fed39f15e96709ade8f83f57dbf5ff5..690c1934e37bfea8bda73ccb2641df91c0db6442 100644 (file)
@@ -26,13 +26,37 @@ dnl along with TrIPE; if not, write to the Free Software Foundation,
 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 AC_INIT(tripe.c)
-AM_INIT_AUTOMAKE(tripe, 1.0.0pre6)
+AM_INIT_AUTOMAKE(tripe, 1.0.0pre7)
 AM_CONFIG_HEADER(config.h)
 AC_CANONICAL_HOST
 
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AM_PROG_LIBTOOL
+python=no
+mdw_PROG_PYTHON([2.3], 
+  [python=yes
+   pyscripts='${PYTHONSCRIPTS}' 
+   pymans='${PYTHONMANS}'])
+AC_SUBST([pyscripts]) AC_SUBST([pymans])
+
+if test $python = yes; then
+  mdw_CHECK_PYTHON([2.3])
+  AC_CACHE_CHECK([for pygtk], [mdw_cv_pygtk], [
+    mdw_cv_pygtk=no
+    python -c >&5 2>&5 '
+import pygtk
+pygtk.require("2.0")
+import gtk 
+' && mdw_cv_pygtk=yes
+  ])
+  if test $mdw_cv_pygtk = yes; then
+    pygtkscripts='${PYGTKSCRIPTS}'
+    pygtkmans='${PYGTKMANS}'
+  fi
+fi
+AC_SUBST([pygtkscripts]) AC_SUBST([pygtkmans])
+
 AC_CHECK_HEADERS([stdarg.h])
 mdw_GCC_FLAGS([-Wall])
 mdw_OPT_TRACE
@@ -84,33 +108,54 @@ AC_ARG_WITH([ethereal],
 esac],
 [ethereal=true requireethereal=false])
 
-case $host_os in
-  linux*)
-    case `uname -r` in
+tun=auto
+AC_ARG_WITH([tunnel],
+[  --with-tunnel=KIND      kinds of tunnel device to use
+                            (linux, unet, bsd, slip)],
+[tun=$withval])
+
+if test "$tun" = auto; then
+  AC_CACHE_CHECK([tunnel drivers to use], [mdw_cv_tunnel], [
+    mdw_cv_tunnel=""
+    case $host_os in
+      linux*)
+       case `uname -r` in
 changequote(,)dnl
-      2.[4-9].* | 2.[1-9][0-9]*.* | [3-9].* | [1-9][0-9]*.*)
+         2.[4-9].* | 2.[1-9][0-9]*.* | [3-9].* | [1-9][0-9]*.*)
 changequote([,])dnl
-       tun=linux
-       AC_DEFINE([TUN_TYPE], [TUN_LINUX], 
-        [Set to the tunnel driver for your OS.  See TUN_* in tripe.h.])
+           mdw_cv_tunnel=linux
+           ;;
+         *)
+           mdw_cv_tunnel=unet
+           ;;
+       esac
        ;;
-      *)
-       tun=unet
-       AC_DEFINE([TUN_TYPE], [TUN_UNET],
-        [Set to the tunnel driver for your OS.  See TUN_* in tripe.h.])
+      *bsd*)
+       mdw_cv_tunnel=bsd
        ;;
     esac
-    ;;
-  *bsd*)
-    tun=bsd
-    AC_DEFINE([TUN_TYPE], [TUN_BSD],
-    [Set to the tunnel driver for your OS.  See TUN_* in tripe.h.])
-    ;;
-  *)
-    AC_MSG_ERROR([Unsupported OS: no tunnel interface available])
-    ;;
-esac
+    mdw_cv_tunnel=$mdw_cv_tunnel${mdw_cv_tunnel:+ }slip
+  ])
+  tun=$mdw_cv_tunnel
+fi
+
+tunnels=""
+for i in $tun; do
+  case $i in
+    linux) AC_DEFINE([TUN_LINUX], [1],
+                    [Install the Linux TUN/TAP driver.]) ;;
+    bsd) AC_DEFINE([TUN_BSD], [1],
+                  [Install the BSD tunnel driver.]) ;;
+    unet) AC_DEFINE([TUN_UNET], [1],
+                    [Install the obsolete Linux Usernet driver.]) ;;
+    slip) ;;
+    *) AC_MSG_ERROR([Unknown tunnel type]) ;;
+  esac
+  tunnels="$tunnels&tun_$i, "
+done
 AC_SUBST(tun)
+AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0], 
+  [List of tunnel drivers to install.])
 
 mdw_MLIB(2.0.0)
 mdw_CATACOMB(2.1.0, [CFLAGS="$CFLAGS $CATACOMB_CFLAGS"])
@@ -178,9 +223,8 @@ if test "$ethereal" = true; then
     fi
     CFLAGS=$mdw_CFLAGS
   ])
-  case $mdw_cv_ethereal_plugin_dir in
+  case $mdw_cv_ethereal_includes in
     failed) ethereal=false;;
-    *) ETHEREAL_PLUGIN_DIR=$mdw_cv_ethereal_plugin_dir;;
   esac  
 fi
 
@@ -206,6 +250,8 @@ mdw_DEFINE_PATHS([
   AC_SUBST(initconfig)
 ])
 AC_SUBST(DIRS)
-AC_OUTPUT(Makefile doc/Makefile ethereal/Makefile tripe-init)
+AC_OUTPUT( \
+       Makefile doc/Makefile ethereal/Makefile \
+       tripe-init tripe-keys tripemon)
 
 dnl ----- That's all, folks -------------------------------------------------