Changeset 4522

Show
Ignore:
Timestamp:
02/07/07 23:11:23 (1 year ago)
Author:
morris
Message:

Update for config.m4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/configure

    r4491 r4522  
    13221322 
    13231323 
     1324# Include shared macros 
     1325# config.m4 
     1326 
     1327 
     1328 
     1329 
     1330 
     1331 
     1332 
     1333 
     1334 
     1335 
     1336 
     1337 
     1338 
     1339 
     1340 
     1341 
     1342 
     1343 
     1344 
     1345 
     1346 
     1347 
     1348 
     1349 
     1350 
     1351 
     1352 
     1353 
     1354 
     1355 
     1356 
     1357 
     1358 
     1359 
     1360 
     1361 
     1362 
     1363 
     1364 
     1365 
     1366 
     1367 
     1368 
     1369 
     1370 
     1371 
     1372 
     1373 
     1374 
    13241375# Get host 
    13251376ac_aux_dir= 
     
    14221473# These are used in the Makefile 
    14231474WR_VERSION=1.1.2 
    1424  
    1425  
    1426 # These are used in configure.in 
    1427  
    1428  
    14291475 
    14301476 
     
    24852531fi; 
    24862532 
    2487  
    2488  
    24892533if test -n "$enable_warnings"; then 
    24902534 
     
    29693013# Checks for additional paths 
    29703014 
    2971 # Check if we need /usr/local/{include,lib}/ 
    2972 if test -d /usr/local/include; then 
    2973         CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
    2974 fi 
    2975  
    2976 if test -d /usr/local/lib; then 
    2977         LDFLAGS="$LDFLAGS -L/usr/local/lib" 
    2978 fi 
    2979  
    2980  
    2981 # Check if we need /usr/local/ssl/{include,lib}/ 
    2982 if test -d /usr/local/ssl/include; then 
    2983         CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    2984 fi 
    2985  
    2986 if test -d /usr/local/ssl/lib; then 
    2987         LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    2988 fi 
    2989  
    2990  
    2991 # Check if we need /usr/kerberos/include 
    2992 if test -d /usr/kerberos/include; then 
    2993         CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    2994 fi 
     3015 
     3016        if test -d /usr/local/include; then 
     3017                CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
     3018        fi 
     3019 
     3020        if test -d /usr/local/ssl/include; then 
     3021                CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
     3022        fi 
     3023 
     3024        if test -d /usr/kerberos/include; then 
     3025                CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
     3026        fi 
     3027 
     3028 
     3029        if test -d /usr/local/lib; then 
     3030                LDFLAGS="$LDFLAGS -L/usr/local/lib" 
     3031        fi 
     3032 
     3033        if test -d /usr/local/ssl/lib; then 
     3034                LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
     3035        fi 
     3036 
    29953037 
    29963038 
     
    29983040# Checks for libraries 
    29993041 
    3000 # Check that we have a libwired in this directory 
    3001 if ! test -f "$srcdir/libwired/configure"; then 
    3002  
    3003     { { echo "$as_me:$LINENO: error: could not locate libwired 
     3042 
     3043        if ! test -f "$srcdir/libwired/configure"; then 
     3044                { { echo "$as_me:$LINENO: error: could not locate libwired 
    30043045 
    30053046You need to download a version of libwired and place it in the same directory as this configure script" >&5 
     
    30083049You need to download a version of libwired and place it in the same directory as this configure script" >&2;} 
    30093050   { (exit 1); exit 1; }; } 
    3010  
    3011 fi 
    3012  
    3013  
    3014 # Check if we need the math library 
    3015 echo "$as_me:$LINENO: checking for pow" >&5 
     3051fi 
     3052 
     3053 
     3054        echo "$as_me:$LINENO: checking for pow" >&5 
    30163055echo $ECHO_N "checking for pow... $ECHO_C" >&6 
    30173056if test "${ac_cv_func_pow+set}" = set; then 
     
    31073146else 
    31083147 
    3109         echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
     3148               echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 
    31103149echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 
    31113150if test "${ac_cv_lib_m_sqrt+set}" = set; then 
     
    31733212if test $ac_cv_lib_m_sqrt = yes; then 
    31743213 
    3175                 LIBS="$LIBS -lm" 
    3176  
    3177 fi 
    3178  
    3179  
    3180 fi 
    3181  
    3182  
    3183  
    3184 # Check if we need the socket library 
    3185 echo "$as_me:$LINENO: checking for setsockopt" >&5 
     3214                        LIBS="$LIBS -lm" 
     3215 
     3216fi 
     3217 
     3218 
     3219fi 
     3220 
     3221 
     3222 
     3223        echo "$as_me:$LINENO: checking for setsockopt" >&5 
    31863224echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 
    31873225if test "${ac_cv_func_setsockopt+set}" = set; then 
     
    32773315else 
    32783316 
    3279         echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
     3317               echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5 
    32803318echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 
    32813319if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 
     
    33433381if test $ac_cv_lib_socket_setsockopt = yes; then 
    33443382 
    3345                 LIBS="$LIBS -lsocket" 
    3346  
    3347 fi 
    3348  
    3349  
    3350 fi 
    3351  
    3352  
    3353  
    3354 # Check if we need the network services library 
    3355 echo "$as_me:$LINENO: checking for gethostent" >&5 
     3383                        LIBS="$LIBS -lsocket" 
     3384 
     3385fi 
     3386 
     3387 
     3388fi 
     3389 
     3390 
     3391 
     3392        echo "$as_me:$LINENO: checking for gethostent" >&5 
    33563393echo $ECHO_N "checking for gethostent... $ECHO_C" >&6 
    33573394if test "${ac_cv_func_gethostent+set}" = set; then 
     
    34473484else 
    34483485 
    3449         echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
     3486               echo "$as_me:$LINENO: checking for gethostent in -lnsl" >&5 
    34503487echo $ECHO_N "checking for gethostent in -lnsl... $ECHO_C" >&6 
    34513488if test "${ac_cv_lib_nsl_gethostent+set}" = set; then 
     
    35133550if test $ac_cv_lib_nsl_gethostent = yes; then 
    35143551 
    3515                 LIBS="$LIBS -lnsl" 
    3516  
    3517 fi 
    3518  
    3519  
    3520 fi 
    3521  
    3522  
    3523  
    3524 # Check if we need the resolve services library 
    3525 echo "$as_me:$LINENO: checking for inet_aton" >&5 
     3552                        LIBS="$LIBS -lnsl" 
     3553 
     3554fi 
     3555 
     3556 
     3557fi 
     3558 
     3559 
     3560 
     3561        echo "$as_me:$LINENO: checking for inet_aton" >&5 
    35263562echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 
    35273563if test "${ac_cv_func_inet_aton+set}" = set; then 
     
    36173653else 
    36183654 
    3619         echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 
     3655               echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 
    36203656echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 
    36213657if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then 
     
    36833719if test $ac_cv_lib_resolv_inet_aton = yes; then 
    36843720 
    3685                 LIBS="$LIBS -lresolv" 
    3686  
    3687 fi 
    3688  
    3689  
    3690 fi 
    3691  
    3692  
    3693  
    3694 # Check for the OpenSSL crypto library 
     3721                        LIBS="$LIBS -lresolv" 
     3722 
     3723fi 
     3724 
     3725 
     3726fi 
     3727 
     3728 
    36953729ac_ext=c 
    36963730ac_cpp='$CPP $CPPFLAGS' 
     
    41794213 
    41804214done 
     4215 
    41814216 
    41824217 
     
    43274362_ACEOF 
    43284363 
    4329         echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
     4364               echo "$as_me:$LINENO: checking for MD5_Init in -lcrypto" >&5 
    43304365echo $ECHO_N "checking for MD5_Init in -lcrypto... $ECHO_C" >&6 
    43314366if test "${ac_cv_lib_crypto_MD5_Init+set}" = set; then 
     
    43934428if test $ac_cv_lib_crypto_MD5_Init = yes; then 
    43944429 
    4395                 LIBS="$LIBS -lcrypto" 
     4430                       LIBS="$LIBS -lcrypto" 
    43964431 
    43974432else 
     
    44024437If you installed OpenSSL into a non-standard directory, please run: 
    44034438 
    4404     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     4439    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    44054440echo "$as_me: error: could not locate OpenSSL 
    44064441 
    44074442If you installed OpenSSL into a non-standard directory, please run: 
    44084443 
    4409     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     4444    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    44104445   { (exit 1); exit 1; }; } 
    44114446 
     
    44214456If you installed OpenSSL into a non-standard directory, please run: 
    44224457 
    4423     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     4458    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    44244459echo "$as_me: error: could not locate OpenSSL 
    44254460 
    44264461If you installed OpenSSL into a non-standard directory, please run: 
    44274462 
    4428     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     4463    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    44294464   { (exit 1); exit 1; }; } 
    44304465 
     
    44364471 
    44374472 
    4438 # Check for the OpenSSL ssl library 
    44394473 
    44404474for ac_header in openssl/ssl.h 
     
    45834617_ACEOF 
    45844618 
    4585         echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
     4619               echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5 
    45864620echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6 
    45874621if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then 
     
    46494683if test $ac_cv_lib_ssl_SSL_library_init = yes; then 
    46504684 
    4651                 LIBS="$LIBS -lssl" 
     4685                       LIBS="$LIBS -lssl" 
    46524686 
    46534687else 
     
    46584692If you installed OpenSSL into a non-standard directory, please run: 
    46594693 
    4660     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     4694    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    46614695echo "$as_me: error: could not locate OpenSSL 
    46624696 
    46634697If you installed OpenSSL into a non-standard directory, please run: 
    46644698 
    4665     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     4699    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    46664700   { (exit 1); exit 1; }; } 
    46674701 
     
    46774711If you installed OpenSSL into a non-standard directory, please run: 
    46784712 
    4679     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     4713    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    46804714echo "$as_me: error: could not locate OpenSSL 
    46814715 
    46824716If you installed OpenSSL into a non-standard directory, please run: 
    46834717 
    4684     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     4718    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    46854719   { (exit 1); exit 1; }; } 
    46864720 
     
    46924726 
    46934727 
    4694 # Check for the iconv library 
    46954728 
    46964729for ac_header in iconv.h 
     
    48394872_ACEOF 
    48404873 
    4841         echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 
     4874               echo "$as_me:$LINENO: checking for iconv in -liconv" >&5 
    48424875echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6 
    48434876if test "${ac_cv_lib_iconv_iconv+set}" = set; then 
     
    49054938if test $ac_cv_lib_iconv_iconv = yes; then 
    49064939 
    4907                 LIBS="$LIBS -liconv" 
    4908  
    4909 else 
    4910  
    4911                 echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 
     4940                       LIBS="$LIBS -liconv" 
     4941 
     4942else 
     4943 
     4944                       echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5 
    49124945echo $ECHO_N "checking for libiconv in -liconv... $ECHO_C" >&6 
    49134946if test "${ac_cv_lib_iconv_libiconv+set}" = set; then 
     
    49755008if test $ac_cv_lib_iconv_libiconv = yes; then 
    49765009 
    4977                         LIBS="$LIBS -liconv" 
    4978  
    4979 else 
    4980  
    4981                         echo "$as_me:$LINENO: checking for iconv" >&5 
     5010                               LIBS="$LIBS -liconv" 
     5011 
     5012else 
     5013 
     5014                               echo "$as_me:$LINENO: checking for iconv" >&5 
    49825015echo $ECHO_N "checking for iconv... $ECHO_C" >&6 
    49835016if test "${ac_cv_func_iconv+set}" = set; then 
     
    50785111If you installed iconv into a non-standard directory, please run: 
    50795112 
    5080     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     5113    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    50815114echo "$as_me: error: could not locate iconv 
    50825115 
    50835116If you installed iconv into a non-standard directory, please run: 
    50845117 
    5085     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     5118    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    50865119   { (exit 1); exit 1; }; } 
    50875120 
     
    51035136If you installed iconv into a non-standard directory, please run: 
    51045137 
    5105     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     5138    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    51065139echo "$as_me: error: could not locate iconv 
    51075140 
    51085141If you installed iconv into a non-standard directory, please run: 
    51095142 
    5110     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     5143    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    51115144   { (exit 1); exit 1; }; } 
    51125145 
     
    51175150 
    51185151 
    5119 echo "$as_me:$LINENO: checking if iconv understands Unicode" >&5 
     5152       echo "$as_me:$LINENO: checking if iconv understands Unicode" >&5 
    51205153echo $ECHO_N "checking if iconv understands Unicode... $ECHO_C" >&6 
    5121 if test "$cross_compiling" = yes; then 
     5154       if test "$cross_compiling" = yes; then 
    51225155  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 
    51235156See \`config.log' for more details." >&5 
     
    51285161  cat >conftest.$ac_ext <<_ACEOF 
    51295162 
    5130         #include <iconv.h> 
    5131         int main(void) { 
    5132                 iconv_t conv = iconv_open("UTF-8", "UTF-16"); 
    5133                 if(conv == (iconv_t) -1) 
    5134                         return 1; 
    5135                 return 0; 
    5136        
     5163               #include <iconv.h> 
     5164               int main(void) { 
     5165                       iconv_t conv = iconv_open("UTF-8", "UTF-16"); 
     5166                       if(conv == (iconv_t) -1) 
     5167                               return 1; 
     5168                       return 0; 
     5169               
    51375170 
    51385171_ACEOF 
     
    51495182  (exit $ac_status); }; }; then 
    51505183 
    5151         echo "$as_me:$LINENO: result: yes" >&5 
     5184               echo "$as_me:$LINENO: result: yes" >&5 
    51525185echo "${ECHO_T}yes" >&6 
    51535186 
     
    51595192( exit $ac_status ) 
    51605193 
    5161         { { echo "$as_me:$LINENO: error: no" >&5 
     5194               { { echo "$as_me:$LINENO: error: no" >&5 
    51625195echo "$as_me: error: no" >&2;} 
    51635196   { (exit 1); exit 1; }; } 
     
    51685201 
    51695202 
    5170 # Check for the termcap library 
    51715203 
    51725204for ac_header in term.h 
     
    53155347_ACEOF 
    53165348 
    5317         echo "$as_me:$LINENO: checking for tgoto" >&5 
     5349               echo "$as_me:$LINENO: checking for tgoto" >&5 
    53185350echo $ECHO_N "checking for tgoto... $ECHO_C" >&6 
    53195351if test "${ac_cv_func_tgoto+set}" = set; then 
     
    54095441else 
    54105442 
    5411                 echo "$as_me:$LINENO: checking for tgoto in -ltermcap" >&5 
     5443                       echo "$as_me:$LINENO: checking for tgoto in -ltermcap" >&5 
    54125444echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6 
    54135445if test "${ac_cv_lib_termcap_tgoto+set}" = set; then 
     
    54755507if test $ac_cv_lib_termcap_tgoto = yes; then 
    54765508 
    5477                         LIBS="$LIBS -ltermcap" 
    5478  
    5479 else 
    5480  
    5481                         echo "$as_me:$LINENO: checking for tgoto in -lncurses" >&5 
     5509                               LIBS="$LIBS -ltermcap" 
     5510 
     5511else 
     5512 
     5513                               echo "$as_me:$LINENO: checking for tgoto in -lncurses" >&5 
    54825514echo $ECHO_N "checking for tgoto in -lncurses... $ECHO_C" >&6 
    54835515if test "${ac_cv_lib_ncurses_tgoto+set}" = set; then 
     
    55455577if test $ac_cv_lib_ncurses_tgoto = yes; then 
    55465578 
    5547                                 LIBS="$LIBS -lncurses" 
    5548  
    5549 else 
    5550  
    5551                                 echo "$as_me:$LINENO: checking for tgoto in -lcurses" >&5 
     5579                                       LIBS="$LIBS -lncurses" 
     5580 
     5581else 
     5582 
     5583                                       echo "$as_me:$LINENO: checking for tgoto in -lcurses" >&5 
    55525584echo $ECHO_N "checking for tgoto in -lcurses... $ECHO_C" >&6 
    55535585if test "${ac_cv_lib_curses_tgoto+set}" = set; then 
     
    56155647if test $ac_cv_lib_curses_tgoto = yes; then 
    56165648 
    5617                                         LIBS="$LIBS -lcurses" 
     5649                                               LIBS="$LIBS -lcurses" 
    56185650 
    56195651fi 
     
    56355667 
    56365668 
    5637 # Check for the readline library 
    56385669 
    56395670for ac_header in readline/readline.h 
     
    57825813_ACEOF 
    57835814 
    5784         echo "$as_me:$LINENO: checking for rl_initialize in -lreadline" >&5 
     5815               echo "$as_me:$LINENO: checking for rl_initialize in -lreadline" >&5 
    57855816echo $ECHO_N "checking for rl_initialize in -lreadline... $ECHO_C" >&6 
    57865817if test "${ac_cv_lib_readline_rl_initialize+set}" = set; then 
     
    58485879if test $ac_cv_lib_readline_rl_initialize = yes; then 
    58495880 
    5850                 LIBS="$LIBS -lreadline" 
    5851  
    5852                 echo "$as_me:$LINENO: checking for GNU readline" >&5 
     5881                       LIBS="$LIBS -lreadline" 
     5882 
     5883                       echo "$as_me:$LINENO: checking for GNU readline" >&5 
    58535884echo $ECHO_N "checking for GNU readline... $ECHO_C" >&6 
    5854                 if test "$cross_compiling" = yes; then 
     5885                       if test "$cross_compiling" = yes; then 
    58555886  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 
    58565887See \`config.log' for more details." >&5 
     
    58615892  cat >conftest.$ac_ext <<_ACEOF 
    58625893 
    5863                         #include <stdio.h> 
    5864                         #include <readline/readline.h> 
    5865                         int main(void) { 
    5866                                 return rl_gnu_readline_p ? 0 : 1; 
    5867                        
     5894                               #include <stdio.h> 
     5895                               #include <readline/readline.h> 
     5896                               int main(void) { 
     5897                                       return rl_gnu_readline_p ? 0 : 1; 
     5898                               
    58685899 
    58695900_ACEOF 
     
    58805911  (exit $ac_status); }; }; then 
    58815912 
    5882                         echo "$as_me:$LINENO: result: yes" >&5 
     5913                               echo "$as_me:$LINENO: result: yes" >&5 
    58835914echo "${ECHO_T}yes" >&6 
    58845915 
     
    58905921( exit $ac_status ) 
    58915922 
    5892                         echo "$as_me:$LINENO: result: no" >&5 
     5923                               echo "$as_me:$LINENO: result: no" >&5 
    58935924echo "${ECHO_T}no" >&6 
    58945925 
     
    58975928If you installed GNU readline into a non-standard directory, please run: 
    58985929 
    5899     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     5930    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    59005931echo "$as_me: error: could not locate GNU readline 
    59015932 
    59025933If you installed GNU readline into a non-standard directory, please run: 
    59035934 
    5904     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     5935    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    59055936   { (exit 1); exit 1; }; } 
    59065937 
     
    59105941fi 
    59115942 
    5912                 echo "$as_me:$LINENO: checking for rl_completion_matches" >&5 
     5943                       echo "$as_me:$LINENO: checking for rl_completion_matches" >&5 
    59135944echo $ECHO_N "checking for rl_completion_matches... $ECHO_C" >&6 
    5914                 if test "$cross_compiling" = yes; then 
     5945                       if test "$cross_compiling" = yes; then 
    59155946  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling 
    59165947See \`config.log' for more details." >&5 
     
    59215952  cat >conftest.$ac_ext <<_ACEOF 
    59225953 
    5923                         #include <stdio.h> 
    5924                         #include <readline/readline.h> 
    5925                         char * generator(const char *, int); 
    5926                         char * generator(const char *text, int state) { 
    5927                                 return NULL; 
    5928                        
    5929                         int main(void) { 
    5930                                 (void) rl_completion_matches("", generator); 
    5931  
    5932                                 return 0; 
    5933                        
     5954                               #include <stdio.h> 
     5955                               #include <readline/readline.h> 
     5956                               char * generator(const char *, int); 
     5957                               char * generator(const char *text, int state) { 
     5958                                       return NULL; 
     5959                               
     5960                               int main(void) { 
     5961                                       (void) rl_completion_matches("", generator); 
     5962 
     5963                                       return 0; 
     5964                               
    59345965 
    59355966_ACEOF 
     
    59515982_ACEOF 
    59525983 
    5953                         echo "$as_me:$LINENO: result: yes" >&5 
     5984                               echo "$as_me:$LINENO: result: yes" >&5 
    59545985echo "${ECHO_T}yes" >&6 
    59555986 
     
    59625993( exit $ac_status ) 
    59635994 
    5964                         echo "$as_me:$LINENO: result: no" >&5 
     5995                               echo "$as_me:$LINENO: result: no" >&5 
    59655996echo "${ECHO_T}no" >&6 
    59665997 
     
    59696000fi 
    59706001 
    5971                 echo "$as_me:$LINENO: checking whether rl_completion_display_matches_hook is declared" >&5 
     6002                       echo "$as_me:$LINENO: checking whether rl_completion_display_matches_hook is declared" >&5 
    59726003echo $ECHO_N "checking whether rl_completion_display_matches_hook is declared... $ECHO_C" >&6 
    59736004if test "${ac_cv_have_decl_rl_completion_display_matches_hook+set}" = set; then 
     
    59816012/* end confdefs.h.  */ 
    59826013 
    5983                         #include <stdio.h> 
    5984                         #include <readline/readline.h> 
     6014                               #include <stdio.h> 
     6015                               #include <readline/readline.h> 
    59856016 
    59866017 
     
    60536084If you installed readline into a non-standard directory, please run: 
    60546085 
    6055     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     6086    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    60566087echo "$as_me: error: could not locate readline 
    60576088 
    60586089If you installed readline into a non-standard directory, please run: 
    60596090 
    6060     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     6091    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    60616092   { (exit 1); exit 1; }; } 
    60626093 
     
    60726103If you installed readline into a non-standard directory, please run: 
    60736104 
    6074     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
     6105    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&5 
    60756106echo "$as_me: error: could not locate readline 
    60766107 
    60776108If you installed readline into a non-standard directory, please run: 
    60786109 
    6079     CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
     6110    env CPPFLAGS=\"-I/path/to/include\" LDFLAGS=\"-L/path/to/lib\" ./configure" >&2;} 
    60806111   { (exit 1); exit 1; }; } 
    60816112 
     
    60876118 
    60886119 
    6089 # Check for CoreServices (Mac OS X) 
    60906120 
    60916121for ac_header in CoreServices/CoreServices.h 
     
    62346264_ACEOF 
    62356265 
    6236         LIBS="$LIBS -framework CoreServices -framework Carbon" 
     6266               LIBS="$LIBS -framework CoreServices -framework Carbon" 
    62376267 
    62386268fi 
    62396269 
    62406270done 
     6271 
    62416272 
    62426273 
  • wire/trunk/configure.in

    r4491 r4522  
    44AC_CONFIG_SRCDIR([config.h.in]) 
    55AC_CONFIG_HEADER([config.h]) 
     6 
     7# Include shared macros 
     8m4_include([libwired/config.m4]) 
    69 
    710# Get host 
     
    1518# These are used in the Makefile 
    1619AC_SUBST([WR_VERSION], [AC_PACKAGE_VERSION]) 
    17  
    18 # These are used in configure.in 
    19 AC_DEFUN([WR_MSG_LIB_ERROR], [ 
    20         AC_MSG_ERROR([could not locate $1 
    21  
    22 If you installed $1 into a non-standard directory, please run: 
    23  
    24     CPPFLAGS="-I/path/to/include" LDFLAGS="-L/path/to/lib" ./configure]) 
    25 ]) 
    26  
    27 AC_DEFUN([WR_MSG_LIBWIRED_ERROR], [ 
    28     AC_MSG_ERROR([could not locate libwired 
    29  
    30 You need to download a version of libwired and place it in the same directory as this configure script]) 
    31 ]) 
    3220 
    3321 
     
    4735AC_ARG_ENABLE([warnings], AC_HELP_STRING([--enable-warnings], [enable warnings])) 
    4836 
    49 AC_DEFUN([WR_WARNING_TRY], [ 
    50         OLD_CFLAGS="$CFLAGS" 
    51         CFLAGS="$CFLAGS $1" 
    52  
    53         AC_COMPILE_IFELSE([ 
    54                 int main(void) { 
    55                         return 0; 
    56                 } 
    57         ], [ 
    58                 WARNFLAGS="$WARNFLAGS $1" 
    59         ], [ 
    60                 CFLAGS="$OLD_CFLAGS" 
    61         ]) 
    62 ]) 
    63  
    6437if test -n "$enable_warnings"; then 
    65         WR_WARNING_TRY([-W]) 
    66         WR_WARNING_TRY([-Wall]) 
    67         WR_WARNING_TRY([-Wno-unknown-pragmas]) 
    68         WR_WARNING_TRY([-Wno-unused-parameter]) 
    69         WR_WARNING_TRY([-Wsign-compare]) 
    70         WR_WARNING_TRY([-Wstrict-prototypes]) 
    71         WR_WARNING_TRY([-Wmissing-prototypes]) 
    72         WR_WARNING_TRY([-Wmissing-declarations]) 
    73         WR_WARNING_TRY([-Wredundant-decls]) 
     38        WI_INCLUDE_WARNING_FLAG([-W]) 
     39        WI_INCLUDE_WARNING_FLAG([-Wall]) 
     40        WI_INCLUDE_WARNING_FLAG([-Wno-unknown-pragmas]) 
     41        WI_INCLUDE_WARNING_FLAG([-Wno-unused-parameter]) 
     42        WI_INCLUDE_WARNING_FLAG([-Wsign-compare]) 
     43        WI_INCLUDE_WARNING_FLAG([-Wstrict-prototypes]) 
     44        WI_INCLUDE_WARNING_FLAG([-Wmissing-prototypes]) 
     45        WI_INCLUDE_WARNING_FLAG([-Wmissing-declarations]) 
     46        WI_INCLUDE_WARNING_FLAG([-Wredundant-decls]) 
    7447 
    7548        AC_MSG_RESULT([$WARNFLAGS]) 
     
    11689# Checks for additional paths 
    11790 
    118 # Check if we need /usr/local/{include,lib}/ 
    119 if test -d /usr/local/include; then 
    120         CPPFLAGS="$CPPFLAGS -I/usr/local/include" 
    121 fi 
    122  
    123 if test -d /usr/local/lib; then 
    124         LDFLAGS="$LDFLAGS -L/usr/local/lib" 
    125 fi 
    126  
    127  
    128 # Check if we need /usr/local/ssl/{include,lib}/ 
    129 if test -d /usr/local/ssl/include; then 
    130         CPPFLAGS="$CPPFLAGS -I/usr/local/ssl/include" 
    131 fi 
    132  
    133 if test -d /usr/local/ssl/lib; then 
    134         LDFLAGS="$LDFLAGS -L/usr/local/ssl/lib" 
    135 fi 
    136  
    137  
    138 # Check if we need /usr/kerberos/include 
    139 if test -d /usr/kerberos/include; then 
    140         CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" 
    141 fi 
     91WI_INCLUDE_EXTRA_INCLUDE_PATHS 
     92WI_INCLUDE_EXTRA_LIBRARY_PATHS 
    14293 
    14394 
     
    14596# Checks for libraries 
    14697 
    147 # Check that we have a libwired in this directory 
    148 if ! test -f "$srcdir/libwired/configure"; then 
    149         WR_MSG_LIBWIRED_ERROR 
    150 fi 
    151  
    152  
    153 # Check if we need the math library 
    154 AC_CHECK_FUNC([pow], [], [ 
    155         AC_CHECK_LIB([m], [sqrt], [ 
    156                 LIBS="$LIBS -lm" 
    157         ]) 
    158 ]) 
    159  
    160  
    161 # Check if we need the socket library 
    162 AC_CHECK_FUNC(setsockopt, [], [ 
    163         AC_CHECK_LIB([socket], [setsockopt], [ 
    164                 LIBS="$LIBS -lsocket" 
    165         ]) 
    166 ]) 
    167  
    168  
    169 # Check if we need the network services library 
    170 AC_CHECK_FUNC([gethostent], [], [ 
    171         AC_CHECK_LIB([nsl], [gethostent], [ 
    172                 LIBS="$LIBS -lnsl" 
    173         ]) 
    174 ]) 
    175  
    176  
    177 # Check if we need the resolve services library 
    178 AC_CHECK_FUNC([inet_aton], [], [ 
    179         AC_CHECK_LIB([resolv], [inet_aton], [ 
    180                 LIBS="$LIBS -lresolv" 
    181         ]) 
    182 ]) 
    183  
    184  
    185 # Check for the OpenSSL crypto library 
    186 AC_CHECK_HEADERS([openssl/sha.h], [ 
    187         AC_CHECK_LIB([crypto], [MD5_Init], [ 
    188                 LIBS="$LIBS -lcrypto" 
    189         ], [ 
    190                 WR_MSG_LIB_ERROR([OpenSSL]) 
    191         ]) 
    192 ], [ 
    193         WR_MSG_LIB_ERROR([OpenSSL]) 
    194 ]) 
    195  
    196  
    197 # Check for the OpenSSL ssl library 
    198 AC_CHECK_HEADERS([openssl/ssl.h], [ 
    199         AC_CHECK_LIB([ssl], [SSL_library_init], [ 
    200                 LIBS="$LIBS -lssl" 
    201         ], [ 
    202                 WR_MSG_LIB_ERROR([OpenSSL]) 
    203         ]) 
    204 ], [ 
    205         WR_MSG_LIB_ERROR([OpenSSL]) 
    206 ]) 
    207  
    208  
    209 # Check for the iconv library 
    210 AC_CHECK_HEADERS([iconv.h], [ 
    211         AC_CHECK_LIB([iconv], [iconv], [ 
    212                 LIBS="$LIBS -liconv" 
    213         ], [ 
    214                 AC_CHECK_LIB([iconv], [libiconv], [ 
    215                         LIBS="$LIBS -liconv" 
    216                 ], [ 
    217                         AC_CHECK_FUNC([iconv], [], [ 
    218                                 WR_MSG_LIB_ERROR([iconv]) 
    219                         ]) 
    220                 ]) 
    221         ]) 
    222 ], [ 
    223         WR_MSG_LIB_ERROR([iconv]) 
    224 ]) 
    225  
    226 AC_MSG_CHECKING([if iconv understands Unicode]) 
    227 AC_RUN_IFELSE([ 
    228         #include <iconv.h> 
    229         int main(void) { 
    230                 iconv_t conv = iconv_open("UTF-8", "UTF-16"); 
    231                 if(conv == (iconv_t) -1) 
    232                         return 1; 
    233                 return 0; 
    234         } 
    235 ], [ 
    236         AC_MSG_RESULT([yes]) 
    237 ], [ 
    238         AC_MSG_ERROR([no]) 
    239 ]) 
    240  
    241  
    242 # Check for the termcap library 
    243 AC_CHECK_HEADERS([term.h], [ 
    244         AC_CHECK_FUNC([tgoto], [], [ 
    245                 AC_CHECK_LIB([termcap], [tgoto], [ 
    246                         LIBS="$LIBS -ltermcap" 
    247                 ], [ 
    248                         AC_CHECK_LIB([ncurses], [tgoto], [ 
    249                                 LIBS="$LIBS -lncurses" 
    250                         ], [ 
    251                                 AC_CHECK_LIB([curses], [tgoto], [ 
    252                                         LIBS="$LIBS -lcurses" 
    253                                 ]) 
    254                         ]) 
    255                 ]) 
    256         ]) 
    257 ]) 
    258  
    259  
    260 # Check for the readline library 
    261 AC_CHECK_HEADERS([readline/readline.h], [ 
    262         AC_CHECK_LIB([readline], [rl_initialize], [ 
    263                 LIBS="$LIBS -lreadline" 
    264  
    265                 AC_MSG_CHECKING([for GNU readline]) 
    266                 AC_RUN_IFELSE([ 
    267                         #include <stdio.h> 
    268                         #include <readline/readline.h> 
    269                         int main(void) { 
    270                                 return rl_gnu_readline_p ? 0 : 1; 
    271                         } 
    272                 ], [ 
    273                         AC_MSG_RESULT([yes]) 
    274                 ], [ 
    275                         AC_MSG_RESULT([no]) 
    276                         WR_MSG_LIB_ERROR([GNU readline]) 
    277                 ]) 
    278  
    279                 AC_MSG_CHECKING([for rl_completion_matches]) 
    280                 AC_RUN_IFELSE([ 
    281                         #include <stdio.h> 
    282                         #include <readline/readline.h> 
    283                         char * generator(const char *, int); 
    284                         char * generator(const char *text, int state) { 
    285                                 return NULL; 
    286                         } 
    287                         int main(void) { 
    288                                 (void) rl_completion_matches("", generator); 
    289  
    290                                 return 0; 
    291                         } 
    292                 ], [ 
    293                         AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], [1], [Define to 1 if you have the `rl_completion_matches' function, and to 0 otherwise.]) 
    294                         AC_MSG_RESULT([yes]) 
    295  
    296                 ], [ 
    297                         AC_MSG_RESULT([no]) 
    298                 ]) 
    299  
    300                 AC_CHECK_DECLS([rl_completion_display_matches_hook], [], [], [ 
    301                         #include <stdio.h> 
    302                         #include <readline/readline.h> 
    303                 ]) 
    304         ], [ 
    305                 WR_MSG_LIB_ERROR([readline]) 
    306         ]) 
    307 ], [ 
    308         WR_MSG_LIB_ERROR([readline]) 
    309 ]) 
    310  
    311  
    312 # Check for CoreServices (Mac OS X) 
    313 AC_CHECK_HEADERS([CoreServices/CoreServices.h], [ 
    314         LIBS="$LIBS -framework CoreServices -framework Carbon" 
    315 ]) 
     98WI_CHECK_LIBWIRED 
     99WI_INCLUDE_MATH_LIBRARY 
     100WI_INCLUDE_SOCKET_LIBRARY 
     101WI_INCLUDE_NSL_LIBRARY 
     102WI_INCLUDE_RESOLV_LIBRARY 
     103WI_INCLUDE_CRYPTO_LIBRARY 
     104WI_INCLUDE_SSL_LIBRARY 
     105WI_INCLUDE_ICONV_LIBRARY 
     106WI_INCLUDE_TERMCAP_LIBRARY 
     107WI_INCLUDE_READLINE_LIBRARY 
     108WI_INCLUDE_CORESERVICES_FRAMEWORK 
    316109 
    317110