~ubuntu-branches/ubuntu/wily/heartbeat/wily

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Martin Loschwitz
  • Date: 2010-03-30 11:08:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330110839-dihbypjhlnj90cm5
Tags: 1:3.0.2+hg12555-2
Removed 01_docbook_path.dpatch from debian/patches as it's useless 

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
fi
711
711
AC_MSG_RESULT(using $GLIBCONFIG)
712
712
 
713
 
AC_ARG_ENABLE([libnet],
714
 
 [  --enable-libnet     Use libnet for ARP based funcationality, [default=try]], 
715
 
 [enable_libnet=$withval], [enable_libnet=try])
716
 
 
717
 
libnet=""
718
 
libnet_version="none"
719
 
LIBNETLIBS=""
720
 
LIBNETDEFINES=""
721
 
 
722
 
AC_MSG_CHECKING(if libnet is required)
723
 
libnet_fatal=$enable_libnet
724
 
case $enable_libnet in
725
 
     no) ;;
726
 
     yes|libnet10|libnet11|10|11) libnet_fatal=yes;;
727
 
     try)
728
 
        case $host_os in
729
 
             *Linux*|*linux*) libnet_fatal=no;;
730
 
             *) libnet_fatal=yes;; dnl legacy behavior
731
 
        esac
732
 
        ;;
733
 
     *) libnet_fatal=yes; enable_libnet=try;;
734
 
esac
735
 
AC_MSG_RESULT($libnet_fatal)
736
 
 
737
 
if test "x$enable_libnet" != "xno"; then
738
 
   AC_PATH_PROGS(LIBNETCONFIG, libnet-config)
739
 
 
740
 
   AC_CHECK_LIB(nsl, t_open)                    dnl -lnsl
741
 
   AC_CHECK_LIB(socket, socket)                 dnl -lsocket
742
 
   AC_CHECK_LIB(net, libnet_get_hwaddr, LIBNETLIBS=" -lnet", [])
743
 
fi
744
 
 
745
 
AC_MSG_CHECKING(for libnet)
746
 
if test "x$LIBNETLIBS" != "x" -o "x$enable_libnet" = "xlibnet11"; then
747
 
      LIBNETDEFINES=""
748
 
      if test "$ac_cv_lib_nsl_t_open" = yes; then
749
 
         LIBNETLIBS="-lnsl $LIBNETLIBS"
750
 
      fi
751
 
      if test "$ac_cv_lib_socket_socket" = yes; then
752
 
         LIBNETLIBS="-lsocket $LIBNETLIBS"
753
 
      fi
754
 
 
755
 
      libnet=net
756
 
      libnet_version="libnet1.1"
757
 
fi
758
 
 
759
 
if test "x$enable_libnet" = "xtry" -o "x$enable_libnet" = "xlibnet10"; then
760
 
   if test "x$LIBNETLIBS" = x -a "x${LIBNETCONFIG}" != "x" ; then
761
 
      LIBNETDEFINES="`$LIBNETCONFIG --defines` `$LIBNETCONFIG --cflags`";
762
 
      LIBNETLIBS="`$LIBNETCONFIG --libs`";
763
 
      libnet_version="libnet1.0 (old)"
764
 
      case $LIBNETLIBS in
765
 
        *-l*)   libnet=`echo $LIBNETLIBS | sed 's%.*-l%%'`;;
766
 
        *)      libnet_version=none;;
767
 
      esac
768
 
 
769
 
      CPPFLAGS="$CPPFLAGS $LIBNETDEFINES"
770
 
 
771
 
      AC_CHECK_HEADERS(libnet.h)
772
 
      if test "$ac_cv_header_libnet_h" = no; then
773
 
        libnet_version=none
774
 
      fi
775
 
   fi
776
 
fi
777
 
AC_MSG_RESULT(found $libnet_version)
778
 
 
779
 
if test "$libnet_version" = none; then
780
 
   LIBNETLIBS=""
781
 
   LIBNETDEFINES=""
782
 
   if test $libnet_fatal = yes; then
783
 
        FatalMissingThing "libnet" "You need libnet to continue."                       \
784
 
                "You can get libnet from http://www.packetfactory.net/libnet"           \
785
 
                "Note that some RPMs split libnet up into libnet and libnet-devel."     \
786
 
                "In this case you have to install libnet-devel too"
787
 
   fi
788
 
 
789
 
else
790
 
   AC_CHECK_LIB($libnet,libnet_init,
791
 
      [new_libnet=yes; AC_DEFINE(HAVE_LIBNET_1_1_API, 1, Libnet 1.1 API)],
792
 
      [new_libnet=no; AC_DEFINE(HAVE_LIBNET_1_0_API, 1, Libnet 1.0 API)],$LIBNETLIBS)
793
 
fi
794
 
 
795
713
sendarp_linux=0
796
714
case $host_os in
797
715
     *Linux*|*linux*) sendarp_linux=1;;
798
716
esac
799
717
 
800
 
AC_SUBST(LIBNETLIBS)
801
 
AC_SUBST(LIBNETDEFINES)
802
 
AC_DEFINE(HAVE_LIBNET_API, test "x$libnet_version" != "xnone", Libnet API)
803
 
 
804
 
AM_CONDITIONAL(SENDARP_LINUX, test $sendarp_linux = 1 )
805
 
AM_CONDITIONAL(USE_LIBNET, test "x$libnet_version" != "xnone" )
806
 
 
807
 
 
808
718
AC_MSG_CHECKING(where is python installed)
809
719
if test "x${PYTHON}" = x; then
810
720
  PYTHON="/usr/bin/env python";
1129
1039
 
1130
1040
CPPFLAGS="$CPPFLAGS $XML2HEAD"
1131
1041
 
1132
 
dnl ************************************************************************
1133
 
dnl * Check for netinet/icmp6.h to enable the IPv6addr resource agent
1134
 
AC_CHECK_HEADERS(netinet/icmp6.h,[],[],[#include <sys/types.h>])
1135
 
AM_CONDITIONAL(USE_IPV6ADDR, test "$ac_cv_header_netinet_icmp6_h" = yes -a "$new_libnet" = yes )
1136
1042
AC_CHECK_HEADERS(libxml/xpath.h)
1137
1043
 
1138
1044
dnl