]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/adns/adns-1.0/configure.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / adns / adns-1.0 / configure.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- /dev/null
7 +++ adns-1.0/acinclude.m4
8 @@ -0,0 +1,70 @@
9 +# aclocal.m4 - package-specific macros for autoconf
10 +#  
11 +#  This file is
12 +#    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
13 +#
14 +#  It is part of adns, which is
15 +#    Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
16 +#    Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
17 +#  
18 +#  This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson
19 +#
20 +#  This program is free software; you can redistribute it and/or modify
21 +#  it under the terms of the GNU General Public License as published by
22 +#  the Free Software Foundation; either version 2, or (at your option)
23 +#  any later version.
24 +#  
25 +#  This program is distributed in the hope that it will be useful,
26 +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
27 +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 +#  GNU General Public License for more details.
29 +#  
30 +#  You should have received a copy of the GNU General Public License
31 +#  along with this program; if not, write to the Free Software Foundation,
32 +#  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
33 +
34 +dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
35 +define(DPKG_CACHED_TRY_COMPILE,[
36 + AC_MSG_CHECKING($1)
37 + AC_CACHE_VAL($2,[
38 +  AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
39 + ])
40 + if test "x$$2" = xyes; then
41 +  true
42 +  $5
43 + else
44 +  true
45 +  $6
46 + fi
47 +])
48 +
49 +define(ADNS_C_GCCATTRIB,[
50 + DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),adns_cv_c_attribute_supported,,
51 +  [extern int testfunction(int x) __attribute__((,,))],
52 +  AC_MSG_RESULT(yes)
53 +  AC_DEFINE(HAVE_GNUC25_ATTRIB)
54 +   DPKG_CACHED_TRY_COMPILE(__attribute__((noreturn)),adns_cv_c_attribute_noreturn,,
55 +    [extern int testfunction(int x) __attribute__((noreturn))],
56 +    AC_MSG_RESULT(yes)
57 +    AC_DEFINE(HAVE_GNUC25_NORETURN),
58 +    AC_MSG_RESULT(no))
59 +   DPKG_CACHED_TRY_COMPILE(__attribute__((const)),adns_cv_c_attribute_const,,
60 +    [extern int testfunction(int x) __attribute__((const))],
61 +    AC_MSG_RESULT(yes)
62 +    AC_DEFINE(HAVE_GNUC25_CONST),
63 +    AC_MSG_RESULT(no))
64 +   DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),adns_cv_attribute_format,,
65 +    [extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))],
66 +    AC_MSG_RESULT(yes)
67 +    AC_DEFINE(HAVE_GNUC25_PRINTFFORMAT),
68 +    AC_MSG_RESULT(no)),
69 +  AC_MSG_RESULT(no))
70 +])
71 +
72 +define(ADNS_C_GETFUNC,[
73 + AC_CHECK_FUNC([$1],,[
74 +  AC_CHECK_LIB([$2],[$1],[$3],[
75 +    AC_MSG_ERROR([cannot find library function $1])
76 +  ])
77 + ])
78 +])
79 --- adns-1.0/configure.in~configure
80 +++ adns-1.0/configure.in
81 @@ -21,24 +21,10 @@
82  #  along with this program; if not, write to the Free Software Foundation,
83  #  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
84  
85 -AC_INIT(src/adns.h)
86 +AC_INIT
87 +AC_CONFIG_SRCDIR([src/adns.h])
88  AC_CONFIG_HEADER(src/config.h)
89  
90 -dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
91 -define(DPKG_CACHED_TRY_COMPILE,[
92 - AC_MSG_CHECKING($1)
93 - AC_CACHE_VAL($2,[
94 -  AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
95 - ])
96 - if test "x$$2" = xyes; then
97 -  true
98 -  $5
99 - else
100 -  true
101 -  $6
102 - fi
103 -])
104 -
105  AC_MSG_CHECKING(whether you requested dynamic linking)
106  AC_SUBST(ENABLE_DYNAMIC)
107  AC_ARG_ENABLE(dynamic,
108 @@ -81,15 +67,13 @@
109  
110  AC_MSG_CHECKING(for INADDR_LOOPBACK)
111  AC_CACHE_VAL(adns_cv_decl_inaddrloopback,[
112 - AC_TRY_COMPILE([
113 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
114  #include <sys/socket.h>
115  #include <netinet/in.h>
116  #include <arpa/inet.h>
117 - ],[
118 + ]], [[
119    INADDR_LOOPBACK;
120 - ],
121 - adns_cv_decl_inaddrloopback=yes,
122 - adns_cv_decl_inaddrloopback=no)])
123 + ]])],[adns_cv_decl_inaddrloopback=yes],[adns_cv_decl_inaddrloopback=no])])
124  if test "$adns_cv_decl_inaddrloopback" = yes; then
125   AC_MSG_RESULT(found)
126  else
127 @@ -141,7 +125,7 @@
128  MKSHLIB_2=''
129  MKSHLIB_3='-lc'
130  
131 -AC_OUTPUT(
132 -       settings.make Makefile
133 +AC_CONFIG_FILES([settings.make Makefile
134         src/Makefile client/Makefile dynamic/Makefile regress/Makefile
135 -)
136 +])
137 +AC_OUTPUT