]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/ettercap/ettercap-0.6.b/configure.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / ettercap / ettercap-0.6.b / configure.patch
1 --- tmp/base/ettercap-0.6.b-r0/ettercap-0.6.b/acinclude.m4      Thu Jul 10 03:25:31 2003
2 +++ ettercap-0.6.b/acinclude.m4 Thu Nov  6 18:25:39 2003
3 @@ -182,9 +182,11 @@
4  dnl     HAVE_SOCKLEN_T
5  dnl
6  
7 -AC_DEFUN(EC_SOCKLEN_CHECK,
8 -   [AC_MSG_CHECKING(for socklen_t in sys/socket.h)
9 +samba_cv_socklen_t
10  
11 +AC_DEFUN(EC_SOCKLEN_CHECK,
12 +   [AC_CACHE_CHECK([for socklen_t in sys/socket.h],
13 +                  [ettercap_cv_type_socklen_t],
14     AC_TRY_RUN([
15        #include <sys/types.h>
16        #include <sys/socket.h>
17 @@ -197,14 +199,12 @@
18           return 0;
19        }
20     ],
21 -   [  AC_MSG_RESULT(yes)
22 -      AC_DEFINE(HAVE_SOCKLEN_T)
23 -      ],
24 -      AC_MSG_RESULT(no);
25 -      ,
26 -      AC_MSG_RESULT(unkown when cross-compiling)
27 -   )
28 +   [ettercap_cv_type_socklen_t=yes],
29 +   [ettercap_cv_type_socklen_t=no]))
30  
31 +   if test X$ettercap_cv_type_socklen_t = Xyes; then
32 +     AC_DEFINE(HAVE_SOCKLEN_T)
33 +   fi
34  ])
35  
36  
37 @@ -377,24 +377,78 @@
38  
39  AC_DEFUN(EC_NS_GET,[
40  
41 -   AC_MSG_CHECKING(for NS_GET32)
42 -   AC_TRY_RUN([
43 -      #include <arpa/nameser.h>
44 +AC_CACHE_CHECK([for NS_GET32],
45 +               ec_cv_func_ns_get32,
46 +               [AC_TRY_LINK([
47 +                #include <arpa/nameser.h>
48 +                ],
49 +                [
50 +                  int i;
51 +                  char *p = "\x01\x02\x03\x04";
52 +                  NS_GET32(i, p);
53 +                ],
54 +                ec_cv_func_ns_get32=yes,
55 +                ec_cv_func_ns_get32=no)
56 +   if test X$ec_cv_func_ns_get32 = Xyes; then
57 +     AC_DEFINE(HAVE_NS_GET,1)
58 +   fi])
59 +])
60  
61 -      int main()
62 -      {
63 -         int i;
64 -         char *p = "\x01\x02\x03\x04";
65 -         NS_GET32(i, p);
66 +dnl vim:ts=3:expandtab
67  
68 -         return 0;
69 -      }
70 -   ],
71 -   [  AC_MSG_RESULT(yes)
72 -      AC_DEFINE(HAVE_NS_GET,1) ],
73 -   [  AC_MSG_RESULT(no); ]
74 -   )
75 +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
76 +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
77 +dnl also defines GSTUFF_PKG_ERRORS on error
78 +AC_DEFUN(PKG_CHECK_MODULES, [
79 +  succeeded=no
80 +
81 +  if test -z "$PKG_CONFIG"; then
82 +    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
83 +  fi
84 +
85 +  if test "$PKG_CONFIG" = "no" ; then
86 +     echo "*** The pkg-config script could not be found. Make sure it is"
87 +     echo "*** in your path, or set the PKG_CONFIG environment variable"
88 +     echo "*** to the full path to pkg-config."
89 +     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
90 +  else
91 +     PKG_CONFIG_MIN_VERSION=0.9.0
92 +     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
93 +        AC_MSG_CHECKING(for $2)
94 +
95 +        if $PKG_CONFIG --exists "$2" ; then
96 +            AC_MSG_RESULT(yes)
97 +            succeeded=yes
98 +
99 +            AC_MSG_CHECKING($1_CFLAGS)
100 +            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
101 +            AC_MSG_RESULT($$1_CFLAGS)
102 +
103 +            AC_MSG_CHECKING($1_LIBS)
104 +            $1_LIBS=`$PKG_CONFIG --libs "$2"`
105 +            AC_MSG_RESULT($$1_LIBS)
106 +        else
107 +            $1_CFLAGS=""
108 +            $1_LIBS=""
109 +            ## If we have a custom action on failure, don't print errors, but 
110 +            ## do set a variable so people can do so.
111 +            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
112 +            ifelse([$4], ,echo $$1_PKG_ERRORS,)
113 +        fi
114 +
115 +        AC_SUBST($1_CFLAGS)
116 +        AC_SUBST($1_LIBS)
117 +     else
118 +        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
119 +        echo "*** See http://www.freedesktop.org/software/pkgconfig"
120 +     fi
121 +  fi
122  
123 +  if test $succeeded = yes; then
124 +     ifelse([$3], , :, [$3])
125 +  else
126 +     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
127 +  fi
128  ])
129  
130 -dnl vim:ts=3:expandtab
131 +
132 --- tmp/base/ettercap-0.6.b-r0/ettercap-0.6.b/configure.in      Thu Jul 10 03:25:31 2003
133 +++ ettercap-0.6.b/configure.in Thu Nov  6 18:13:44 2003
134 @@ -20,9 +20,10 @@
135  dnl    $Id: configure.in,v 1.69 2003/06/30 19:57:41 alor Exp $
136  dnl
137  
138 -AC_PREREQ([2.50])
139 +AC_PREREQ(2.57)
140  
141 -AC_INIT(src/ec_main.c)
142 +AC_INIT
143 +AC_CONFIG_SRCDIR([src/ec_main.c])
144  AC_CONFIG_HEADER(config.h)
145  
146  echo "char configure_line[[]] = \"$0 $*\";" > ./src/include/ec_debug_info.h
147 @@ -77,7 +78,7 @@
148  dnl   Check the OS
149  dnl ================
150  
151 -AC_CANONICAL_SYSTEM
152 +AC_CANONICAL_TARGET([])
153  case "$target_os" in
154  *linux*)
155     EC_LINUX_KERNEL()
156 @@ -868,7 +869,8 @@
157  
158  AC_SUBST(MAKEPLUG)
159  
160 -AC_OUTPUT(ettercap.spec ettercap.8 Makefile $makeplug win32/ettercap.nsi)
161 +AC_CONFIG_FILES([ettercap.spec ettercap.8 Makefile $makeplug win32/ettercap.nsi])
162 +AC_OUTPUT
163  
164  dnl ============================
165  dnl   FOR DEBUGING INFORMATIONS