chiark / gitweb /
Infrastructure: Get it building again, using pkg-config.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 18 Mar 2008 00:30:42 +0000 (00:30 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 18 Mar 2008 00:43:50 +0000 (00:43 +0000)
client/Makefile.am
configure.in
debian/changelog
doc/Makefile.am
init/tripe-init.in
proxy/Makefile.am
server/Makefile.am

index f466ba4817dcc0f6f460ee35956a60a94eca901c..a24e0d2189fd381dda73776d43f640d14ebcac4b 100644 (file)
@@ -27,7 +27,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = ../common/libtripe.a @CATACOMB_LIBS@
+LDADD = ../common/libtripe.a
 
 bin_PROGRAMS = tripectl
 
index b8dbbdeff10a0cb180b8edb8ed7e7588b90564ea..e36e07cb16a179dc299dbef054304a7a6d2bb660 100644 (file)
@@ -35,16 +35,18 @@ AC_PROG_CC
 AM_PROG_LIBTOOL
 DIRS="" AC_SUBST([DIRS])
 
-python=no
-mdw_PROG_PYTHON([2.3],
-  [python=yes
+AX_WITH_PYTHON([2.3], [missing])
+if test "$PYTHON" = "missing"; then
+  python=no
+else
+  python=yes
    pyscripts='${PYTHONSCRIPTS}'
    DIRS="$DIRS keys"
-   pymans='${PYTHONMANS}'])
+   pymans='${PYTHONMANS}'
+fi
 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 '
@@ -61,9 +63,65 @@ import gtk
 fi
 AC_SUBST([pygtkscripts]) AC_SUBST([pygtkmans])
 
+
+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
+         [2.[4-9].*] | [2.[1-9][0-9]*.*] | [[3-9].*] | [[1-9][0-9]*.*])
+           mdw_cv_tunnel=linux
+           ;;
+         *)
+           mdw_cv_tunnel=unet
+           ;;
+       esac
+       ;;
+      *bsd*)
+       mdw_cv_tunnel=bsd
+       ;;
+    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.])
+
+
+
+
+
 AC_CHECK_HEADERS([stdarg.h])
-mdw_GCC_FLAGS([-Wall])
-mdw_OPT_TRACE
+AX_CFLAGS_WARN_ALL
+
+AC_ARG_WITH([tracing],
+[  --without-tracing      compile out tracing support (not recommended)],
+[test "$withval" = no && AC_DEFINE([NTRACE], [1], [Disable all tracing.])],
+[:])
 
 AC_ARG_WITH([linux-includes],
 [  --with-linux-includes=DIR
@@ -111,62 +169,14 @@ AC_ARG_WITH([wireshark],
 esac],
 [wireshark=true requirewireshark=false])
 
-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]*.*)
-changequote([,])dnl
-           mdw_cv_tunnel=linux
-           ;;
-         *)
-           mdw_cv_tunnel=unet
-           ;;
-       esac
-       ;;
-      *bsd*)
-       mdw_cv_tunnel=bsd
-       ;;
-    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"])
+PKG_CHECK_MODULES(mLib, mLib >= 2.0.4)
+PKG_CHECK_MODULES(catacomb, catacomb >= 2.1.1)
+CFLAGS="$CFLAGS $mLib_CFLAGS $catacomb_CFLAGS"
+LIBS="$LIBS $mLib_LIBS"
 
 if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
   AC_CACHE_CHECK([where to put Wireshark plugins],
     [mdw_cv_wireshark_plugin_dir], [
-    changequote(,)
     mdw_cv_wireshark_plugin_dir="failed"
     wsprefix=none
     for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
@@ -177,13 +187,13 @@ if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
     done
     if test "$wsprefix" != none; then
       wsbin=$wsprefix/bin/tshark
-      wsver=`$wsbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
-      dir=$wsprefix/lib/wireshark/plugins/$wsver
+      wsver=`$wsbin -v | sed ['s/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q']`
+      dir=$wsprefix/lib/wireshark/plugins
+      test -d "$dir/$wsver" && dir="$dir/$wsver"
       if test -d "$dir"; then
        mdw_cv_wireshark_plugin_dir=$dir
       fi
     fi
-    changequote([, ])
   ])
   case $mdw_cv_wireshark_plugin_dir in
     failed) wireshark=false;;
index dc38e272d078531ab317f005699866dc812fa318..a6c80e5ce2b1129752a5f02d087627d1a1e41b64 100644 (file)
@@ -2,7 +2,7 @@ tripe (1.0.0pre7) experimental; urgency=low
 
   * Support SLIP encapsulation.
 
- -- Mark Wooding <mdw@distorted.org.uk>         Sun,  4 Sep 2005 00:52:56 +0100
+ -- Mark Wooding <mdw@distorted.org.uk>  Sun,  4 Sep 2005 00:52:56 +0100
 
 tripe (1.0.0pre6) experimental; urgency=low
 
index 09073cc54035f4d116ac574d04909443c332c086..c051ffd998e53695113d2acd66fe403b3cacfa52 100644 (file)
@@ -29,12 +29,12 @@ AUTOMAKE_OPTIONS = foreign
 
 CONST_MANS = pkstream.1 tripe-mitm.8
 AUTO_MANS = tripe.8 tripectl.1
+PYTHONMANS = tripe-keys.8 tripe-keys.conf.5
+PYGTKMANS = tripemon.1
 man_MANS = \
        $(CONST_MANS) $(AUTO_MANS) tripe-admin.5 \
        @pymans@ @pygtkmans@
 
-PYTHONMANS = tripe-keys.8 tripe-keys.conf.5
-PYGTKMANS = tripemon.1.in
 EXTRA_DIST = \
        $(CONST_MANS) tripe-admin.5.in $(PYTHONMANS) $(PYGTKMANS) \
        make-summary
index bac4e7f2dc7d851c8f5a81892b603d7b0b88c4ad..bf7bdb67ce646063993baaec8fe96ef9db99f8fe 100755 (executable)
@@ -33,7 +33,7 @@ case ${tunnel-`$tripe --tunnels | head -1`} in
   linux)
     case `uname -s` in
       Linux)
-       if { test -f /proc/misc && grep -q net/tun /proc/misc; } ||
+       if { test -f /proc/misc && grep -q tun /proc/misc; } ||
           modprobe -q tun; then
          : good
        else
index ad9c70c27dac5d6c9793ed9889db5dbf607ea26e..a4defb807161a1ad588e790b80b001ea3c2eeda7 100644 (file)
@@ -27,7 +27,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = @CATACOMB_LIBS@
+LDADD = @catacomb_LIBS@
 
 bin_PROGRAMS = tripe-mitm
 
index e1748e2efc7e97b46d213667e4ea109a3759f1f3..2d8f7f38f4f37e5439610a6c0107957703346631 100644 (file)
@@ -27,7 +27,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
-LDADD = ../common/libtripe.a @CATACOMB_LIBS@
+LDADD = ../common/libtripe.a $(catacomb_LIBS)
 configdir = @configdir@
 tun = @tun@