Thread: [Dhcp-agent-commits] CVS: dhcp-agent configure,1.17,1.18 configure.in,1.17,1.18 dhcp-util.h,1.1,1.2
Status: Alpha
Brought to you by:
actmodern
From: Thamer Al-H. <act...@us...> - 2002-06-07 12:51:16
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory usw-pr-cvs1:/tmp/cvs-serv17553 Modified Files: configure configure.in dhcp-util.h Log Message: fix to __progname detection in configure.in; added license to dhcp-util.h Index: configure =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** configure 6 Jun 2002 23:59:00 -0000 1.17 --- configure 7 Jun 2002 12:51:12 -0000 1.18 *************** *** 2756,2759 **** --- 2756,2760 ---- #include <stdlib.h> #include <stdio.h> + extern const char *__progname; int *************** *** 2768,2796 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2770: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2773: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2776: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2779: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF #define HAVE_PROGNAME 1 EOF ! , echo "$as_me:2784: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2789: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext; ! echo "$as_me:2794: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then --- 2769,2798 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2771: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2774: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2777: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2780: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF #define HAVE_PROGNAME 1 EOF ! ! echo "$as_me:2786: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2791: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext; ! echo "$as_me:2796: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then *************** *** 2798,2802 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2800 "configure" #include "confdefs.h" #include <signal.h> --- 2800,2804 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2802 "configure" #include "confdefs.h" #include <signal.h> *************** *** 2814,2827 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2819: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2822: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2825: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes --- 2816,2829 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2818: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2821: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2824: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2827: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes *************** *** 2833,2837 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2835: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then --- 2835,2839 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2837: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then *************** *** 2842,2846 **** fi ! echo "$as_me:2844: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then --- 2844,2848 ---- fi ! echo "$as_me:2846: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then *************** *** 2848,2852 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2850 "configure" #include "confdefs.h" #include <sys/types.h> --- 2850,2854 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2852 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 2870,2883 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2872: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2875: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2878: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2881: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void --- 2872,2885 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2874: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2877: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2880: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2883: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void *************** *** 2889,2893 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2891: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 --- 2891,2895 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2893: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 *************** *** 2898,2902 **** if test -z "$pcap_prefix"; then ! echo "$as_me:2900: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" --- 2900,2904 ---- if test -z "$pcap_prefix"; then ! echo "$as_me:2902: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" *************** *** 2909,2913 **** if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2911: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2911,2915 ---- if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2913: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 2918,2926 **** fi ! echo "$as_me:2920: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:2924: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" --- 2920,2928 ---- fi ! echo "$as_me:2922: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:2926: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" *************** *** 2933,2937 **** if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:2935: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2935,2939 ---- if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:2937: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 2942,2946 **** fi ! echo "$as_me:2944: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" --- 2944,2948 ---- fi ! echo "$as_me:2946: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" *************** *** 2959,2963 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:2961: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then --- 2961,2965 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:2963: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then *************** *** 2976,2980 **** if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:2978: found $ac_dir/$ac_word" >&5 break fi --- 2978,2982 ---- if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:2980: found $ac_dir/$ac_word" >&5 break fi *************** *** 2987,2994 **** if test -n "$DNET_PATH"; then ! echo "$as_me:2989: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:2992: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2989,2996 ---- if test -n "$DNET_PATH"; then ! echo "$as_me:2991: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:2994: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3000,3004 **** if test $DNET_PATH = "no"; then ! echo "$as_me:3002: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then --- 3002,3006 ---- if test $DNET_PATH = "no"; then ! echo "$as_me:3004: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then *************** *** 3008,3012 **** LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3010 "configure" #include "confdefs.h" --- 3010,3014 ---- LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3012 "configure" #include "confdefs.h" *************** *** 3027,3040 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3029: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3032: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3035: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3038: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes --- 3029,3042 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3031: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3034: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3037: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3040: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes *************** *** 3047,3056 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3049: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3054: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } --- 3049,3058 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3051: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3056: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } *************** *** 3159,3163 **** ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3161: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF --- 3161,3165 ---- ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3163: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF *************** *** 3335,3339 **** --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3337: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 --- 3337,3341 ---- --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3339: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 *************** *** 3359,3368 **** # This is an error. ! -*) { { echo "$as_me:3361: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3366: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; --- 3361,3370 ---- # This is an error. ! -*) { { echo "$as_me:3363: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3368: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; *************** *** 3605,3609 **** if test x"$ac_file" != x-; then ! { echo "$as_me:3607: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" --- 3607,3611 ---- if test x"$ac_file" != x-; then ! { echo "$as_me:3609: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" *************** *** 3623,3627 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3625: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3625,3629 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3627: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3636,3640 **** else # /dev/null tree ! { { echo "$as_me:3638: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3638,3642 ---- else # /dev/null tree ! { { echo "$as_me:3640: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3697,3701 **** esac ! test x"$ac_file" != x- && { echo "$as_me:3699: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} --- 3699,3703 ---- esac ! test x"$ac_file" != x- && { echo "$as_me:3701: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} *************** *** 3708,3712 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3710: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3710,3714 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3712: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3721,3725 **** else # /dev/null tree ! { { echo "$as_me:3723: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3723,3727 ---- else # /dev/null tree ! { { echo "$as_me:3725: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3838,3842 **** if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3840: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else --- 3840,3844 ---- if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3842: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else Index: configure.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.in,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** configure.in 6 Jun 2002 23:59:00 -0000 1.17 --- configure.in 7 Jun 2002 12:51:13 -0000 1.18 *************** *** 59,65 **** #include <stdlib.h> #include <stdio.h> ],[ const char *s = __progname; ! ], [ AC_DEFINE(HAVE_PROGNAME), AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)]); AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T)], [], [#include <signal.h>]) --- 59,67 ---- #include <stdlib.h> #include <stdio.h> + extern const char *__progname; ],[ const char *s = __progname; ! ], [ AC_DEFINE(HAVE_PROGNAME) ! AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)]); AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T)], [], [#include <signal.h>]) Index: dhcp-util.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-util.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-util.h 7 Jun 2002 00:04:37 -0000 1.1 --- dhcp-util.h 7 Jun 2002 12:51:13 -0000 1.2 *************** *** 1,2 **** --- 1,29 ---- + /* $Header$ + * + * Copyright 2001 Thamer Alharbash + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ + + #ifndef DHCP_UTIL_H + #define DHCP_UTIL_H + /* Utility functions. */ *************** *** 33,34 **** --- 60,63 ---- extern struct timeval timeval_diff(struct timeval begin, struct timeval end); extern const char *getprogname(void); + + #endif /* DHCP_UTIL_H */ |