Changeset 547 for trunk/configure.ac


Ignore:
Timestamp:
04/26/10 13:29:15 (2 years ago)
Author:
eagle
Message:
  • configure.ac refined
  • OC now compiles and runs on Solaris 10 using the Universal TUN/TAP driver version 1.1 (http://vtun.sourceforge.net/tun/index.html)
  • ocathosts.[ch] added. It reads IPv6 addresses from /etc/hosts
  • /etc/hosts reverse lookup for I2P .b32 names added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r546 r547  
    88AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision]) 
    99 
    10 AC_SUBST([CFLAGS], [["-Wall -O2"]]) 
    11  
    12 AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[enable debugging]), AC_DEFINE([DEBUG], [], [enable debugging])) 
    13 AC_ARG_ENABLE([packet-log], AS_HELP_STRING([--enable-packet-log],[enable packet logging]), AC_DEFINE([PACKET_LOG], [], [enable packet logging])) 
    14 AC_ARG_ENABLE([handle-http], AS_HELP_STRING([--enable-handle-http],[enable handling of accidental HTTP requests]), AC_DEFINE([HANDLE_HTTP], [], [enable handling of accidental HTTP requests])) 
    15 AC_ARG_ENABLE([packet-queue], AS_HELP_STRING([--enable-packet-queue],[enable queueuing of packets while connecting setup]), AC_DEFINE([PACKET_QUEUE], [], [enable packet queue])) 
    16 AC_ARG_ENABLE([check-ipsrc], AS_HELP_STRING([--disable-check-ipsrc],[disable source ip checking before forwarding]), AC_DEFINE([CHECK_IPSRC], [], [disable source ip checking])) 
    17 AC_ARG_ENABLE([rtt], AS_HELP_STRING([--enable-rtt],[enable inband RTT measurement]), AC_DEFINE([MEASURE_RTT], [], [enable RTT measurement])) 
     10 
     11AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[enable debugging]),  
     12   AC_DEFINE([DEBUG], [1], [enable debugging]) 
     13   ) 
     14 
     15AC_ARG_ENABLE([packet-log], AS_HELP_STRING([--enable-packet-log],[enable packet logging]),  
     16   AC_DEFINE([PACKET_LOG], [], [enable packet logging])) 
     17 
     18AC_ARG_ENABLE([handle-http], AS_HELP_STRING([--enable-handle-http],[enable handling of accidental HTTP requests]), 
     19   AC_DEFINE([HANDLE_HTTP], [], [enable handling of accidental HTTP requests])) 
     20 
     21AC_ARG_ENABLE([packet-queue], AS_HELP_STRING([--enable-packet-queue],[enable queueuing of packets while connecting setup]), 
     22   AC_DEFINE([PACKET_QUEUE], [], [enable packet queue])) 
     23 
     24AC_ARG_ENABLE([check-ipsrc], AS_HELP_STRING([--disable-check-ipsrc],[disable source ip checking before forwarding]), 
     25   AC_DEFINE([CHECK_IPSRC], [1], [disable source ip checking])) 
     26 
     27AC_ARG_ENABLE([rtt], AS_HELP_STRING([--enable-rtt],[enable inband RTT measurement]),  
     28   AC_DEFINE([MEASURE_RTT], [1], [enable RTT measurement])) 
     29 
     30AC_ARG_ENABLE([tundev], AS_HELP_STRING([--disable-tundev],[compile without tunnel device code]), 
     31   AC_DEFINE([WITHOUT_TUN], [1], [exclude tunnel device code])) 
     32 
     33 
     34if test "${enable_debug+set}" = set ; then 
     35   AC_SUBST([CFLAGS], [["-Wall -g -D_POSIX_PTHREAD_SEMANTICS"]]) 
     36else 
     37   AC_SUBST([CFLAGS], [["-Wall -O2 -D_POSIX_PTHREAD_SEMANTICS"]]) 
     38fi 
    1839 
    1940# Checks for programs. 
     
    3556#AC_CHECK_LIB([readline], [main]) 
    3657 
     58AC_SEARCH_LIBS([bind], [socket]) 
     59AC_SEARCH_LIBS([inet_ntop], [nsl]) 
     60 
    3761# Checks for header files. 
    3862#AC_HEADER_STDC 
    39 AC_CHECK_HEADERS([sys/types.h sys/wait.h sys/socket.h netinet/in.h netinet/in_systm.h netinet/ip.h netinet/ip6.h netinet/in6.h net/if.h net/if_tun.h linux/if_tun.h linux/sockios.h endian.h sys/endian.h netinet/icmp6.h net/ethernet.h netinet/if_ether.h netinet/ether.h], [], [], 
     63AC_CHECK_HEADERS([sys/types.h sys/wait.h sys/socket.h sys/stat.h netdb.h netinet/in.h netinet/in_systm.h netinet/ip.h netinet/ip6.h netinet/in6.h net/if.h net/if_tun.h linux/if_tun.h linux/sockios.h endian.h sys/endian.h netinet/icmp6.h net/ethernet.h netinet/if_ether.h netinet/ether.h sys/ethernet.h fcntl.h time.h], [], [], 
    4064[[ 
    4165#ifdef HAVE_SYS_TYPES_H 
     
    117141      [], 
    118142      [ 
    119 #include <sys/types.h> 
     143#ifdef HAVE_SYS_TYPES_H 
     144#include <sys/types.h> 
     145#endif 
     146#ifdef HAVE_SYS_SOCKET_H 
    120147#include <sys/socket.h> 
    121 #ifdef HAVE_NETINET_IN_H 
    122 #include <netinet/in.h> 
     148#endif 
     149#ifdef HAVE_NETINET_IN_H 
     150#include <netinet/in.h> 
     151#endif 
     152]) 
     153 
     154AC_CHECK_MEMBER([struct stat.st_mtim], 
     155                [AC_DEFINE(HAVE_STAT_ST_MTIM, 1, [Do we have stat.st_mtim?])], 
     156                [ 
     157AC_CHECK_MEMBER([struct stat.st_mtimespec], 
     158                [AC_DEFINE(HAVE_STAT_ST_MTIMESPEC, 1, [Do we have stat.st_mtimespec?])], 
     159                [], 
     160                [ 
     161#ifdef HAVE_SYS_TYPES_H 
     162#include <sys/types.h> 
     163#endif 
     164#ifdef HAVE_SYS_STAT_H 
     165#include <sys/stat.h> 
     166#endif 
     167                 ]) 
     168                 ], 
     169                [ 
     170#ifdef HAVE_SYS_TYPES_H 
     171#include <sys/types.h> 
     172#endif 
     173#ifdef HAVE_SYS_STAT_H 
     174#include <sys/stat.h> 
     175#endif 
     176                 ]) 
     177 
     178AC_CHECK_MEMBER([struct ether_header.ether_dhost.ether_addr_octet], 
     179                [AC_DEFINE(HAVE_ETHER_ADDR_OCTET, 1, [Do we have ether_header.ether_dhost.ether_addr_octet])], 
     180                [], 
     181                [ 
     182#ifdef HAVE_SYS_TYPES_H 
     183#include <sys/types.h> 
     184#endif 
     185#ifdef HAVE_SYS_ETHERNET_H 
     186#include <sys/ethernet.h> 
    123187#endif 
    124188]) 
Note: See TracChangeset for help on using the changeset viewer.