Changeset 502


Ignore:
Timestamp:
05/25/09 07:23:01 (3 years ago)
Author:
eagle
Message:

improved autoconf for better pthread configuration (acx_pthread.m4)

Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r500 r502  
    11* version 0.1.12 
     2 - improved autoconf for better pthread configuration (acx_pthread.m4) 
    23 - socks connector completely rewritten. Works now 
    34   without dynamic thread pool. This is more memory efficient. 
  • trunk/Makefile.am

    r486 r502  
    22DIST_SUBDIRS = src/cygwin src man 
    33dist_doc_DATA = README 
     4ACLOCAL_AMFLAGS = -I . 
     5EXTRA_DIST = acx_pthread.m4 
    46 
  • trunk/Makefile.in

    r500 r502  
    3131PRE_UNINSTALL = : 
    3232POST_UNINSTALL = : 
     33build_triplet = @build@ 
     34host_triplet = @host@ 
    3335subdir = . 
    3436DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ 
     
    3840        install-sh missing 
    3941ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 
    40 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 
     42am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ 
     43        $(top_srcdir)/configure.ac 
    4144am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 
    4245        $(ACLOCAL_M4) 
     
    115118PACKAGE_VERSION = @PACKAGE_VERSION@ 
    116119PATH_SEPARATOR = @PATH_SEPARATOR@ 
     120PTHREAD_CC = @PTHREAD_CC@ 
     121PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ 
     122PTHREAD_LIBS = @PTHREAD_LIBS@ 
    117123SET_MAKE = @SET_MAKE@ 
    118124SHELL = @SHELL@ 
     
    124130abs_top_srcdir = @abs_top_srcdir@ 
    125131ac_ct_CC = @ac_ct_CC@ 
     132acx_pthread_config = @acx_pthread_config@ 
    126133am__include = @am__include@ 
    127134am__leading_dot = @am__leading_dot@ 
     
    130137am__untar = @am__untar@ 
    131138bindir = @bindir@ 
     139build = @build@ 
    132140build_alias = @build_alias@ 
     141build_cpu = @build_cpu@ 
     142build_os = @build_os@ 
     143build_vendor = @build_vendor@ 
    133144builddir = @builddir@ 
    134145datadir = @datadir@ 
     
    137148dvidir = @dvidir@ 
    138149exec_prefix = @exec_prefix@ 
     150host = @host@ 
    139151host_alias = @host_alias@ 
     152host_cpu = @host_cpu@ 
     153host_os = @host_os@ 
     154host_vendor = @host_vendor@ 
    140155htmldir = @htmldir@ 
    141156includedir = @includedir@ 
     
    164179DIST_SUBDIRS = src/cygwin src man 
    165180dist_doc_DATA = README 
     181ACLOCAL_AMFLAGS = -I . 
     182EXTRA_DIST = acx_pthread.m4 
    166183all: config.h 
    167184        $(MAKE) $(AM_MAKEFLAGS) all-recursive 
  • trunk/aclocal.m4

    r500 r502  
    876876]) # _AM_PROG_TAR 
    877877 
     878m4_include([acx_pthread.m4]) 
  • trunk/config.h.in

    r491 r502  
    1818/* Define to 1 if you have the `ether_ntoa_r' function. */ 
    1919#undef HAVE_ETHER_NTOA_R 
    20  
    21 /* Define to 1 if you have the `pthread' library (-lpthread). */ 
    22 #undef HAVE_LIBPTHREAD 
    2320 
    2421/* Define to 1 if you have the <linux/if_tun.h> header file. */ 
     
    6057/* Define to 1 if you have the <net/if_tun.h> header file. */ 
    6158#undef HAVE_NET_IF_TUN_H 
     59 
     60/* Define if you have POSIX threads libraries and header files. */ 
     61#undef HAVE_PTHREAD 
    6262 
    6363/* Do we have sockaddr_in.sin_len? */ 
     
    115115#undef PACKET_QUEUE 
    116116 
     117/* Define to necessary symbol if this constant uses a non-standard name on 
     118   your system. */ 
     119#undef PTHREAD_CREATE_JOINABLE 
     120 
    117121/* SVN Revision */ 
    118122#undef SVN_REVISION 
  • trunk/configure

    r500 r502  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.63 for onioncat 0.1.12.r499. 
     3# Generated by GNU Autoconf 2.63 for onioncat 0.1.12.r501. 
    44# 
    55# Report bugs to <rahra@cypherpunk.at>. 
     
    597597PACKAGE_NAME='onioncat' 
    598598PACKAGE_TARNAME='onioncat' 
    599 PACKAGE_VERSION='0.1.12.r499' 
    600 PACKAGE_STRING='onioncat 0.1.12.r499' 
     599PACKAGE_VERSION='0.1.12.r501' 
     600PACKAGE_STRING='onioncat 0.1.12.r501' 
    601601PACKAGE_BUGREPORT='rahra@cypherpunk.at' 
    602602 
    603603ac_subst_vars='LTLIBOBJS 
    604604LIBOBJS 
     605PTHREAD_CFLAGS 
     606PTHREAD_LIBS 
     607PTHREAD_CC 
     608acx_pthread_config 
     609host_os 
     610host_vendor 
     611host_cpu 
     612host 
     613build_os 
     614build_vendor 
     615build_cpu 
     616build 
    605617am__fastdepCC_FALSE 
    606618am__fastdepCC_TRUE 
     
    12501262  # This message is too long to be a string in the A/UX 3.1 sh. 
    12511263  cat <<_ACEOF 
    1252 \`configure' configures onioncat 0.1.12.r499 to adapt to many kinds of systems. 
     1264\`configure' configures onioncat 0.1.12.r501 to adapt to many kinds of systems. 
    12531265 
    12541266Usage: $0 [OPTION]... [VAR=VALUE]... 
     
    13111323  --program-suffix=SUFFIX            append SUFFIX to installed program names 
    13121324  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names 
     1325 
     1326System types: 
     1327  --build=BUILD     configure for building on BUILD [guessed] 
     1328  --host=HOST       cross-compile to build programs to run on HOST [BUILD] 
    13131329_ACEOF 
    13141330fi 
     
    13161332if test -n "$ac_init_help"; then 
    13171333  case $ac_init_help in 
    1318      short | recursive ) echo "Configuration of onioncat 0.1.12.r499:";; 
     1334     short | recursive ) echo "Configuration of onioncat 0.1.12.r501:";; 
    13191335   esac 
    13201336  cat <<\_ACEOF 
     
    14081424if $ac_init_version; then 
    14091425  cat <<\_ACEOF 
    1410 onioncat configure 0.1.12.r499 
     1426onioncat configure 0.1.12.r501 
    14111427generated by GNU Autoconf 2.63 
    14121428 
     
    14221438running configure, to aid debugging if configure makes a mistake. 
    14231439 
    1424 It was created by onioncat $as_me 0.1.12.r499, which was 
     1440It was created by onioncat $as_me 0.1.12.r501, which was 
    14251441generated by GNU Autoconf 2.63.  Invocation command line was 
    14261442 
     
    21382154# Define the identity of the package. 
    21392155 PACKAGE='onioncat' 
    2140  VERSION='0.1.12.r499' 
     2156 VERSION='0.1.12.r501' 
    21412157 
    21422158 
     
    22852301 
    22862302cat >>confdefs.h <<\_ACEOF 
    2287 #define SVN_REVISION "499" 
    2288 _ACEOF 
    2289  
    2290  
    2291 CFLAGS="-Wall -pthread -O2" 
     2303#define SVN_REVISION "501" 
     2304_ACEOF 
     2305 
     2306 
     2307CFLAGS="-Wall -O2" 
    22922308 
    22932309 
     
    34523468 
    34533469#AC_PROG_INSTALL 
    3454  
    3455 # Checks for libraries. 
    3456  
    3457  
    3458 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 
    3459 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } 
    3460 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then 
     3470# Make sure we can run config.sub. 
     3471$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 
     3472  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 
     3473$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} 
     3474   { (exit 1); exit 1; }; } 
     3475 
     3476{ $as_echo "$as_me:$LINENO: checking build system type" >&5 
     3477$as_echo_n "checking build system type... " >&6; } 
     3478if test "${ac_cv_build+set}" = set; then 
    34613479  $as_echo_n "(cached) " >&6 
    34623480else 
    3463   ac_check_lib_save_LIBS=$LIBS 
    3464 LIBS="-lpthread  $LIBS" 
    3465 cat >conftest.$ac_ext <<_ACEOF 
     3481  ac_build_alias=$build_alias 
     3482test "x$ac_build_alias" = x && 
     3483  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 
     3484test "x$ac_build_alias" = x && 
     3485  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 
     3486$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 
     3487   { (exit 1); exit 1; }; } 
     3488ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 
     3489  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 
     3490$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} 
     3491   { (exit 1); exit 1; }; } 
     3492 
     3493fi 
     3494{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 
     3495$as_echo "$ac_cv_build" >&6; } 
     3496case $ac_cv_build in 
     3497*-*-*) ;; 
     3498*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 
     3499$as_echo "$as_me: error: invalid value of canonical build" >&2;} 
     3500   { (exit 1); exit 1; }; };; 
     3501esac 
     3502build=$ac_cv_build 
     3503ac_save_IFS=$IFS; IFS='-' 
     3504set x $ac_cv_build 
     3505shift 
     3506build_cpu=$1 
     3507build_vendor=$2 
     3508shift; shift 
     3509# Remember, the first character of IFS is used to create $*, 
     3510# except with old shells: 
     3511build_os=$* 
     3512IFS=$ac_save_IFS 
     3513case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 
     3514 
     3515 
     3516{ $as_echo "$as_me:$LINENO: checking host system type" >&5 
     3517$as_echo_n "checking host system type... " >&6; } 
     3518if test "${ac_cv_host+set}" = set; then 
     3519  $as_echo_n "(cached) " >&6 
     3520else 
     3521  if test "x$host_alias" = x; then 
     3522  ac_cv_host=$ac_cv_build 
     3523else 
     3524  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 
     3525    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 
     3526$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} 
     3527   { (exit 1); exit 1; }; } 
     3528fi 
     3529 
     3530fi 
     3531{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 
     3532$as_echo "$ac_cv_host" >&6; } 
     3533case $ac_cv_host in 
     3534*-*-*) ;; 
     3535*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 
     3536$as_echo "$as_me: error: invalid value of canonical host" >&2;} 
     3537   { (exit 1); exit 1; }; };; 
     3538esac 
     3539host=$ac_cv_host 
     3540ac_save_IFS=$IFS; IFS='-' 
     3541set x $ac_cv_host 
     3542shift 
     3543host_cpu=$1 
     3544host_vendor=$2 
     3545shift; shift 
     3546# Remember, the first character of IFS is used to create $*, 
     3547# except with old shells: 
     3548host_os=$* 
     3549IFS=$ac_save_IFS 
     3550case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 
     3551 
     3552 
     3553 
     3554 
     3555 
     3556 
     3557ac_ext=c 
     3558ac_cpp='$CPP $CPPFLAGS' 
     3559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 
     3560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 
     3561ac_compiler_gnu=$ac_cv_c_compiler_gnu 
     3562 
     3563acx_pthread_ok=no 
     3564 
     3565# We used to check for pthread.h first, but this fails if pthread.h 
     3566# requires special compiler flags (e.g. on True64 or Sequent). 
     3567# It gets checked for in the link test anyway. 
     3568 
     3569# First of all, check if the user has set any of the PTHREAD_LIBS, 
     3570# etcetera environment variables, and if threads linking works using 
     3571# them: 
     3572if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then 
     3573        save_CFLAGS="$CFLAGS" 
     3574        CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
     3575        save_LIBS="$LIBS" 
     3576        LIBS="$PTHREAD_LIBS $LIBS" 
     3577        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 
     3578$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } 
     3579        cat >conftest.$ac_ext <<_ACEOF 
    34663580/* confdefs.h.  */ 
    34673581_ACEOF 
     
    34763590extern "C" 
    34773591#endif 
    3478 char pthread_create (); 
     3592char pthread_join (); 
    34793593int 
    34803594main () 
    34813595{ 
    3482 return pthread_create (); 
     3596return pthread_join (); 
    34833597  ; 
    34843598  return 0; 
     
    35063620         $as_test_x conftest$ac_exeext 
    35073621       }; then 
    3508   ac_cv_lib_pthread_pthread_create=yes 
     3622  acx_pthread_ok=yes 
    35093623else 
    35103624  $as_echo "$as_me: failed program was:" >&5 
    35113625sed 's/^/| /' conftest.$ac_ext >&5 
    35123626 
    3513         ac_cv_lib_pthread_pthread_create=no 
     3627 
    35143628fi 
    35153629 
     
    35173631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
    35183632      conftest$ac_exeext conftest.$ac_ext 
    3519 LIBS=$ac_check_lib_save_LIBS 
    3520 fi 
    3521 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 
    3522 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } 
    3523 if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then 
    3524   cat >>confdefs.h <<_ACEOF 
    3525 #define HAVE_LIBPTHREAD 1 
    3526 _ACEOF 
    3527  
    3528   LIBS="-lpthread $LIBS" 
    3529  
    3530 fi 
    3531  
     3633        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 
     3634$as_echo "$acx_pthread_ok" >&6; } 
     3635        if test x"$acx_pthread_ok" = xno; then 
     3636                PTHREAD_LIBS="" 
     3637                PTHREAD_CFLAGS="" 
     3638        fi 
     3639        LIBS="$save_LIBS" 
     3640        CFLAGS="$save_CFLAGS" 
     3641fi 
     3642 
     3643# We must check for the threads library under a number of different 
     3644# names; the ordering is very important because some systems 
     3645# (e.g. DEC) have both -lpthread and -lpthreads, where one of the 
     3646# libraries is broken (non-POSIX). 
     3647 
     3648# Create a list of thread flags to try.  Items starting with a "-" are 
     3649# C compiler flags, and other items are library names, except for "none" 
     3650# which indicates that we try without any flags at all, and "pthread-config" 
     3651# which is a program returning the flags for the Pth emulation library. 
     3652 
     3653acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" 
     3654 
     3655# The ordering *is* (sometimes) important.  Some notes on the 
     3656# individual items follow: 
     3657 
     3658# pthreads: AIX (must check this before -lpthread) 
     3659# none: in case threads are in libc; should be tried before -Kthread and 
     3660#       other compiler flags to prevent continual compiler warnings 
     3661# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 
     3662# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 
     3663# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) 
     3664# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) 
     3665# -pthreads: Solaris/gcc 
     3666# -mthreads: Mingw32/gcc, Lynx/gcc 
     3667# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it 
     3668#      doesn't hurt to check since this sometimes defines pthreads too; 
     3669#      also defines -D_REENTRANT) 
     3670#      ... -mt is also the pthreads flag for HP/aCC 
     3671# pthread: Linux, etcetera 
     3672# --thread-safe: KAI C++ 
     3673# pthread-config: use pthread-config program (for GNU Pth library) 
     3674 
     3675case "${host_cpu}-${host_os}" in 
     3676        *solaris*) 
     3677 
     3678        # On Solaris (at least, for some versions), libc contains stubbed 
     3679        # (non-functional) versions of the pthreads routines, so link-based 
     3680        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/ 
     3681        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather 
     3682        # a function called by this macro, so we could check for that, but 
     3683        # who knows whether they'll stub that too in a future libc.)  So, 
     3684        # we'll just look for -pthreads and -lpthread first: 
     3685 
     3686        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" 
     3687        ;; 
     3688esac 
     3689 
     3690if test x"$acx_pthread_ok" = xno; then 
     3691for flag in $acx_pthread_flags; do 
     3692 
     3693        case $flag in 
     3694                none) 
     3695                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 
     3696$as_echo_n "checking whether pthreads work without any flags... " >&6; } 
     3697                ;; 
     3698 
     3699                -*) 
     3700                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 
     3701$as_echo_n "checking whether pthreads work with $flag... " >&6; } 
     3702                PTHREAD_CFLAGS="$flag" 
     3703                ;; 
     3704 
     3705                pthread-config) 
     3706                # Extract the first word of "pthread-config", so it can be a program name with args. 
     3707set dummy pthread-config; ac_word=$2 
     3708{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 
     3709$as_echo_n "checking for $ac_word... " >&6; } 
     3710if test "${ac_cv_prog_acx_pthread_config+set}" = set; then 
     3711  $as_echo_n "(cached) " >&6 
     3712else 
     3713  if test -n "$acx_pthread_config"; then 
     3714  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. 
     3715else 
     3716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
     3717for as_dir in $PATH 
     3718do 
     3719  IFS=$as_save_IFS 
     3720  test -z "$as_dir" && as_dir=. 
     3721  for ac_exec_ext in '' $ac_executable_extensions; do 
     3722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
     3723    ac_cv_prog_acx_pthread_config="yes" 
     3724    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
     3725    break 2 
     3726  fi 
     3727done 
     3728done 
     3729IFS=$as_save_IFS 
     3730 
     3731  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" 
     3732fi 
     3733fi 
     3734acx_pthread_config=$ac_cv_prog_acx_pthread_config 
     3735if test -n "$acx_pthread_config"; then 
     3736  { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5 
     3737$as_echo "$acx_pthread_config" >&6; } 
     3738else 
     3739  { $as_echo "$as_me:$LINENO: result: no" >&5 
     3740$as_echo "no" >&6; } 
     3741fi 
     3742 
     3743 
     3744                if test x"$acx_pthread_config" = xno; then continue; fi 
     3745                PTHREAD_CFLAGS="`pthread-config --cflags`" 
     3746                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" 
     3747                ;; 
     3748 
     3749                *) 
     3750                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 
     3751$as_echo_n "checking for the pthreads library -l$flag... " >&6; } 
     3752                PTHREAD_LIBS="-l$flag" 
     3753                ;; 
     3754        esac 
     3755 
     3756        save_LIBS="$LIBS" 
     3757        save_CFLAGS="$CFLAGS" 
     3758        LIBS="$PTHREAD_LIBS $LIBS" 
     3759        CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
     3760 
     3761        # Check for various functions.  We must include pthread.h, 
     3762        # since some functions may be macros.  (On the Sequent, we 
     3763        # need a special flag -Kthread to make this header compile.) 
     3764        # We check for pthread_join because it is in -lpthread on IRIX 
     3765        # while pthread_create is in libc.  We check for pthread_attr_init 
     3766        # due to DEC craziness with -lpthreads.  We check for 
     3767        # pthread_cleanup_push because it is one of the few pthread 
     3768        # functions on Solaris that doesn't have a non-functional libc stub. 
     3769        # We try pthread_create on general principles. 
     3770        cat >conftest.$ac_ext <<_ACEOF 
     3771/* confdefs.h.  */ 
     3772_ACEOF 
     3773cat confdefs.h >>conftest.$ac_ext 
     3774cat >>conftest.$ac_ext <<_ACEOF 
     3775/* end confdefs.h.  */ 
     3776#include <pthread.h> 
     3777int 
     3778main () 
     3779{ 
     3780pthread_t th; pthread_join(th, 0); 
     3781                     pthread_attr_init(0); pthread_cleanup_push(0, 0); 
     3782                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); 
     3783  ; 
     3784  return 0; 
     3785} 
     3786_ACEOF 
     3787rm -f conftest.$ac_objext conftest$ac_exeext 
     3788if { (ac_try="$ac_link" 
     3789case "(($ac_try" in 
     3790  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     3791  *) ac_try_echo=$ac_try;; 
     3792esac 
     3793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 
     3794$as_echo "$ac_try_echo") >&5 
     3795  (eval "$ac_link") 2>conftest.er1 
     3796  ac_status=$? 
     3797  grep -v '^ *+' conftest.er1 >conftest.err 
     3798  rm -f conftest.er1 
     3799  cat conftest.err >&5 
     3800  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3801  (exit $ac_status); } && { 
     3802         test -z "$ac_c_werror_flag" || 
     3803         test ! -s conftest.err 
     3804       } && test -s conftest$ac_exeext && { 
     3805         test "$cross_compiling" = yes || 
     3806         $as_test_x conftest$ac_exeext 
     3807       }; then 
     3808  acx_pthread_ok=yes 
     3809else 
     3810  $as_echo "$as_me: failed program was:" >&5 
     3811sed 's/^/| /' conftest.$ac_ext >&5 
     3812 
     3813 
     3814fi 
     3815 
     3816rm -rf conftest.dSYM 
     3817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     3818      conftest$ac_exeext conftest.$ac_ext 
     3819 
     3820        LIBS="$save_LIBS" 
     3821        CFLAGS="$save_CFLAGS" 
     3822 
     3823        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 
     3824$as_echo "$acx_pthread_ok" >&6; } 
     3825        if test "x$acx_pthread_ok" = xyes; then 
     3826                break; 
     3827        fi 
     3828 
     3829        PTHREAD_LIBS="" 
     3830        PTHREAD_CFLAGS="" 
     3831done 
     3832fi 
     3833 
     3834# Various other checks: 
     3835if test "x$acx_pthread_ok" = xyes; then 
     3836        save_LIBS="$LIBS" 
     3837        LIBS="$PTHREAD_LIBS $LIBS" 
     3838        save_CFLAGS="$CFLAGS" 
     3839        CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
     3840 
     3841        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. 
     3842        { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 
     3843$as_echo_n "checking for joinable pthread attribute... " >&6; } 
     3844        attr_name=unknown 
     3845        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do 
     3846            cat >conftest.$ac_ext <<_ACEOF 
     3847/* confdefs.h.  */ 
     3848_ACEOF 
     3849cat confdefs.h >>conftest.$ac_ext 
     3850cat >>conftest.$ac_ext <<_ACEOF 
     3851/* end confdefs.h.  */ 
     3852#include <pthread.h> 
     3853int 
     3854main () 
     3855{ 
     3856int attr=$attr; return attr; 
     3857  ; 
     3858  return 0; 
     3859} 
     3860_ACEOF 
     3861rm -f conftest.$ac_objext conftest$ac_exeext 
     3862if { (ac_try="$ac_link" 
     3863case "(($ac_try" in 
     3864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 
     3865  *) ac_try_echo=$ac_try;; 
     3866esac 
     3867eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" 
     3868$as_echo "$ac_try_echo") >&5 
     3869  (eval "$ac_link") 2>conftest.er1 
     3870  ac_status=$? 
     3871  grep -v '^ *+' conftest.er1 >conftest.err 
     3872  rm -f conftest.er1 
     3873  cat conftest.err >&5 
     3874  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3875  (exit $ac_status); } && { 
     3876         test -z "$ac_c_werror_flag" || 
     3877         test ! -s conftest.err 
     3878       } && test -s conftest$ac_exeext && { 
     3879         test "$cross_compiling" = yes || 
     3880         $as_test_x conftest$ac_exeext 
     3881       }; then 
     3882  attr_name=$attr; break 
     3883else 
     3884  $as_echo "$as_me: failed program was:" >&5 
     3885sed 's/^/| /' conftest.$ac_ext >&5 
     3886 
     3887 
     3888fi 
     3889 
     3890rm -rf conftest.dSYM 
     3891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 
     3892      conftest$ac_exeext conftest.$ac_ext 
     3893        done 
     3894        { $as_echo "$as_me:$LINENO: result: $attr_name" >&5 
     3895$as_echo "$attr_name" >&6; } 
     3896        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then 
     3897 
     3898cat >>confdefs.h <<_ACEOF 
     3899#define PTHREAD_CREATE_JOINABLE $attr_name 
     3900_ACEOF 
     3901 
     3902        fi 
     3903 
     3904        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 
     3905$as_echo_n "checking if more special flags are required for pthreads... " >&6; } 
     3906        flag=no 
     3907        case "${host_cpu}-${host_os}" in 
     3908            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; 
     3909            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; 
     3910        esac 
     3911        { $as_echo "$as_me:$LINENO: result: ${flag}" >&5 
     3912$as_echo "${flag}" >&6; } 
     3913        if test "x$flag" != xno; then 
     3914            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" 
     3915        fi 
     3916 
     3917        LIBS="$save_LIBS" 
     3918        CFLAGS="$save_CFLAGS" 
     3919 
     3920        # More AIX lossage: must compile with xlc_r or cc_r 
     3921        if test x"$GCC" != xyes; then 
     3922          for ac_prog in xlc_r cc_r 
     3923do 
     3924  # Extract the first word of "$ac_prog", so it can be a program name with args. 
     3925set dummy $ac_prog; ac_word=$2 
     3926{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 
     3927$as_echo_n "checking for $ac_word... " >&6; } 
     3928if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then 
     3929  $as_echo_n "(cached) " >&6 
     3930else 
     3931  if test -n "$PTHREAD_CC"; then 
     3932  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. 
     3933else 
     3934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
     3935for as_dir in $PATH 
     3936do 
     3937  IFS=$as_save_IFS 
     3938  test -z "$as_dir" && as_dir=. 
     3939  for ac_exec_ext in '' $ac_executable_extensions; do 
     3940  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 
     3941    ac_cv_prog_PTHREAD_CC="$ac_prog" 
     3942    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
     3943    break 2 
     3944  fi 
     3945done 
     3946done 
     3947IFS=$as_save_IFS 
     3948 
     3949fi 
     3950fi 
     3951PTHREAD_CC=$ac_cv_prog_PTHREAD_CC 
     3952if test -n "$PTHREAD_CC"; then 
     3953  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 
     3954$as_echo "$PTHREAD_CC" >&6; } 
     3955else 
     3956  { $as_echo "$as_me:$LINENO: result: no" >&5 
     3957$as_echo "no" >&6; } 
     3958fi 
     3959 
     3960 
     3961  test -n "$PTHREAD_CC" && break 
     3962done 
     3963test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" 
     3964 
     3965        else 
     3966          PTHREAD_CC=$CC 
     3967        fi 
     3968else 
     3969        PTHREAD_CC="$CC" 
     3970fi 
     3971 
     3972 
     3973 
     3974 
     3975 
     3976# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: 
     3977if test x"$acx_pthread_ok" = xyes; then 
     3978 
     3979cat >>confdefs.h <<\_ACEOF 
     3980#define HAVE_PTHREAD 1 
     3981_ACEOF 
     3982 
     3983        : 
     3984else 
     3985        acx_pthread_ok=no 
     3986 
     3987fi 
     3988ac_ext=c 
     3989ac_cpp='$CPP $CPPFLAGS' 
     3990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 
     3991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 
     3992ac_compiler_gnu=$ac_cv_c_compiler_gnu 
     3993 
     3994 
     3995 
     3996# Checks for libraries. 
     3997#AC_CHECK_LIB([pthread], [pthread_create]) 
    35323998#AC_CHECK_LIB([rt], [clock_gettime]) 
    35333999#AC_CHECK_LIB([readline], [main]) 
     4000 
     4001LIBS="$PTHREAD_LIBS $LIBS" 
     4002CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
     4003CC="$PTHREAD_CC" 
    35344004 
    35354005# Checks for header files. 
     
    48045274# values after options handling. 
    48055275ac_log=" 
    4806 This file was extended by onioncat $as_me 0.1.12.r499, which was 
     5276This file was extended by onioncat $as_me 0.1.12.r501, which was 
    48075277generated by GNU Autoconf 2.63.  Invocation command line was 
    48085278 
     
    48675337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 
    48685338ac_cs_version="\\ 
    4869 onioncat config.status 0.1.12.r499 
     5339onioncat config.status 0.1.12.r501 
    48705340configured by $0, generated by GNU Autoconf 2.63, 
    48715341  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 
  • trunk/configure.ac

    r496 r502  
    88AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision]) 
    99 
    10 AC_SUBST([CFLAGS], [["-Wall -pthread -O2"]]) 
     10AC_SUBST([CFLAGS], [["-Wall -O2"]]) 
    1111 
    1212AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [enable debugging]), AC_DEFINE([DEBUG], [], [enable debugging])) 
     
    2020AC_PROG_CC 
    2121#AC_PROG_INSTALL 
     22ACX_PTHREAD 
    2223 
    2324# Checks for libraries. 
    24 AC_CHECK_LIB([pthread], [pthread_create]) 
     25#AC_CHECK_LIB([pthread], [pthread_create]) 
    2526#AC_CHECK_LIB([rt], [clock_gettime]) 
    2627#AC_CHECK_LIB([readline], [main]) 
     28 
     29LIBS="$PTHREAD_LIBS $LIBS" 
     30CFLAGS="$CFLAGS $PTHREAD_CFLAGS" 
     31CC="$PTHREAD_CC" 
    2732 
    2833# Checks for header files. 
  • trunk/man/Makefile.in

    r500 r502  
    3030PRE_UNINSTALL = : 
    3131POST_UNINSTALL = : 
     32build_triplet = @build@ 
     33host_triplet = @host@ 
    3234subdir = man 
    3335DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 
    3436ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 
    35 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 
     37am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ 
     38        $(top_srcdir)/configure.ac 
    3639am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 
    3740        $(ACLOCAL_M4) 
     
    8285PACKAGE_VERSION = @PACKAGE_VERSION@ 
    8386PATH_SEPARATOR = @PATH_SEPARATOR@ 
     87PTHREAD_CC = @PTHREAD_CC@ 
     88PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ 
     89PTHREAD_LIBS = @PTHREAD_LIBS@ 
    8490SET_MAKE = @SET_MAKE@ 
    8591SHELL = @SHELL@ 
     
    9197abs_top_srcdir = @abs_top_srcdir@ 
    9298ac_ct_CC = @ac_ct_CC@ 
     99acx_pthread_config = @acx_pthread_config@ 
    93100am__include = @am__include@ 
    94101am__leading_dot = @am__leading_dot@ 
     
    97104am__untar = @am__untar@ 
    98105bindir = @bindir@ 
     106build = @build@ 
    99107build_alias = @build_alias@ 
     108build_cpu = @build_cpu@ 
     109build_os = @build_os@ 
     110build_vendor = @build_vendor@ 
    100111builddir = @builddir@ 
    101112datadir = @datadir@ 
     
    104115dvidir = @dvidir@ 
    105116exec_prefix = @exec_prefix@ 
     117host = @host@ 
    106118host_alias = @host_alias@ 
     119host_cpu = @host_cpu@ 
     120host_os = @host_os@ 
     121host_vendor = @host_vendor@ 
    107122htmldir = @htmldir@ 
    108123includedir = @includedir@ 
  • trunk/src/Makefile.in

    r500 r502  
    3232PRE_UNINSTALL = : 
    3333POST_UNINSTALL = : 
     34build_triplet = @build@ 
     35host_triplet = @host@ 
    3436bin_PROGRAMS = ocat$(EXEEXT) 
    3537subdir = src 
     
    3739        $(srcdir)/Makefile.in 
    3840ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 
    39 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 
     41am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ 
     42        $(top_srcdir)/configure.ac 
    4043am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 
    4144        $(ACLOCAL_M4) 
     
    110113PACKAGE_VERSION = @PACKAGE_VERSION@ 
    111114PATH_SEPARATOR = @PATH_SEPARATOR@ 
     115PTHREAD_CC = @PTHREAD_CC@ 
     116PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ 
     117PTHREAD_LIBS = @PTHREAD_LIBS@ 
    112118SET_MAKE = @SET_MAKE@ 
    113119SHELL = @SHELL@ 
     
    119125abs_top_srcdir = @abs_top_srcdir@ 
    120126ac_ct_CC = @ac_ct_CC@ 
     127acx_pthread_config = @acx_pthread_config@ 
    121128am__include = @am__include@ 
    122129am__leading_dot = @am__leading_dot@ 
     
    125132am__untar = @am__untar@ 
    126133bindir = @bindir@ 
     134build = @build@ 
    127135build_alias = @build_alias@ 
     136build_cpu = @build_cpu@ 
     137build_os = @build_os@ 
     138build_vendor = @build_vendor@ 
    128139builddir = @builddir@ 
    129140datadir = @datadir@ 
     
    132143dvidir = @dvidir@ 
    133144exec_prefix = @exec_prefix@ 
     145host = @host@ 
    134146host_alias = @host_alias@ 
     147host_cpu = @host_cpu@ 
     148host_os = @host_os@ 
     149host_vendor = @host_vendor@ 
    135150htmldir = @htmldir@ 
    136151includedir = @includedir@ 
  • trunk/src/cygwin/Makefile.in

    r500 r502  
    3131PRE_UNINSTALL = : 
    3232POST_UNINSTALL = : 
     33build_triplet = @build@ 
     34host_triplet = @host@ 
    3335subdir = src/cygwin 
    3436DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ 
    3537        $(srcdir)/Makefile.in 
    3638ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 
    37 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 
     39am__aclocal_m4_deps = $(top_srcdir)/acx_pthread.m4 \ 
     40        $(top_srcdir)/configure.ac 
    3841am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 
    3942        $(ACLOCAL_M4) 
     
    9194PACKAGE_VERSION = @PACKAGE_VERSION@ 
    9295PATH_SEPARATOR = @PATH_SEPARATOR@ 
     96PTHREAD_CC = @PTHREAD_CC@ 
     97PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ 
     98PTHREAD_LIBS = @PTHREAD_LIBS@ 
    9399SET_MAKE = @SET_MAKE@ 
    94100SHELL = @SHELL@ 
     
    100106abs_top_srcdir = @abs_top_srcdir@ 
    101107ac_ct_CC = @ac_ct_CC@ 
     108acx_pthread_config = @acx_pthread_config@ 
    102109am__include = @am__include@ 
    103110am__leading_dot = @am__leading_dot@ 
     
    106113am__untar = @am__untar@ 
    107114bindir = @bindir@ 
     115build = @build@ 
    108116build_alias = @build_alias@ 
     117build_cpu = @build_cpu@ 
     118build_os = @build_os@ 
     119build_vendor = @build_vendor@ 
    109120builddir = @builddir@ 
    110121datadir = @datadir@ 
     
    113124dvidir = @dvidir@ 
    114125exec_prefix = @exec_prefix@ 
     126host = @host@ 
    115127host_alias = @host_alias@ 
     128host_cpu = @host_cpu@ 
     129host_os = @host_os@ 
     130host_vendor = @host_vendor@ 
    116131htmldir = @htmldir@ 
    117132includedir = @includedir@ 
  • trunk/src/ocat.c

    r500 r502  
    387387 
    388388   memcpy(&CNF(ocat_hwaddr[3]), &CNF(ocat_addr.s6_addr[13]), 3); 
    389    if (CNF(use_tap)); 
     389   if (CNF(use_tap)) 
    390390      log_msg(LOG_INFO, "MAC address %s", ether_ntoa_r((struct ether_addr*) CNF(ocat_hwaddr), hw)); 
    391391 
Note: See TracChangeset for help on using the changeset viewer.