git-svn: trunk@1765
Tomasz Kojm authored on 2005/11/22 06:01:12... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Mon Nov 21 21:57:29 CET 2005 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * configure.in: check for __attribute__((aligned)) |
|
4 |
+ |
|
1 | 5 |
Mon Nov 21 19:29:24 CET 2005 (tk) |
2 | 6 |
--------------------------------- |
3 | 7 |
* clamd/others.h: fix compilation error on systems with INCOMPLETE_CMSG |
... | ... |
@@ -14177,11 +14177,68 @@ _ACEOF |
14177 | 14177 |
|
14178 | 14178 |
fi |
14179 | 14179 |
|
14180 |
+echo "$as_me:$LINENO: checking for type aligning via __attribute__((aligned))" >&5 |
|
14181 |
+echo $ECHO_N "checking for type aligning via __attribute__((aligned))... $ECHO_C" >&6 |
|
14182 |
+if test "${have_attrib_aligned+set}" = set; then |
|
14183 |
+ echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
14184 |
+else |
|
14185 |
+ |
|
14186 |
+ cat >conftest.$ac_ext <<_ACEOF |
|
14187 |
+/* confdefs.h. */ |
|
14188 |
+_ACEOF |
|
14189 |
+cat confdefs.h >>conftest.$ac_ext |
|
14190 |
+cat >>conftest.$ac_ext <<_ACEOF |
|
14191 |
+/* end confdefs.h. */ |
|
14192 |
+ |
|
14193 |
+int |
|
14194 |
+main () |
|
14195 |
+{ |
|
14196 |
+typedef int cl_aligned_int __attribute__((aligned)); |
|
14197 |
+ ; |
|
14198 |
+ return 0; |
|
14199 |
+} |
|
14200 |
+_ACEOF |
|
14201 |
+rm -f conftest.$ac_objext |
|
14202 |
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
|
14203 |
+ (eval $ac_compile) 2>conftest.er1 |
|
14204 |
+ ac_status=$? |
|
14205 |
+ grep -v '^ *+' conftest.er1 >conftest.err |
|
14206 |
+ rm -f conftest.er1 |
|
14207 |
+ cat conftest.err >&5 |
|
14208 |
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
14209 |
+ (exit $ac_status); } && |
|
14210 |
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
|
14211 |
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
14212 |
+ (eval $ac_try) 2>&5 |
|
14213 |
+ ac_status=$? |
|
14214 |
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
14215 |
+ (exit $ac_status); }; } && |
|
14216 |
+ { ac_try='test -s conftest.$ac_objext' |
|
14217 |
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
14218 |
+ (eval $ac_try) 2>&5 |
|
14219 |
+ ac_status=$? |
|
14220 |
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
14221 |
+ (exit $ac_status); }; }; then |
|
14222 |
+ have_attrib_aligned=yes |
|
14223 |
+else |
|
14224 |
+ echo "$as_me: failed program was:" >&5 |
|
14225 |
+sed 's/^/| /' conftest.$ac_ext >&5 |
|
14226 |
+ |
|
14227 |
+have_attrib_aligned=no |
|
14228 |
+fi |
|
14229 |
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
|
14230 |
+ |
|
14231 |
+fi |
|
14232 |
+ |
|
14233 |
+echo "$as_me:$LINENO: result: $have_attrib_aligned" >&5 |
|
14234 |
+echo "${ECHO_T}$have_attrib_aligned" >&6 |
|
14235 |
+ |
|
14180 | 14236 |
if test "$have_attrib_packed" = no -a "$have_pragma_pack" = no ; then |
14181 | 14237 |
{ { echo "$as_me:$LINENO: error: Need to know how to pack structures with this compiler" >&5 |
14182 | 14238 |
echo "$as_me: error: Need to know how to pack structures with this compiler" >&2;} |
14183 | 14239 |
{ (exit 1); exit 1; }; } |
14184 | 14240 |
fi |
14241 |
+ |
|
14185 | 14242 |
if test "$have_attrib_packed" = yes; then |
14186 | 14243 |
|
14187 | 14244 |
cat >>confdefs.h <<\_ACEOF |
... | ... |
@@ -14190,6 +14247,14 @@ _ACEOF |
14190 | 14190 |
|
14191 | 14191 |
fi |
14192 | 14192 |
|
14193 |
+if test "$have_attrib_aligned" = yes; then |
|
14194 |
+ |
|
14195 |
+cat >>confdefs.h <<\_ACEOF |
|
14196 |
+#define HAVE_ATTRIB_ALIGNED 1 |
|
14197 |
+_ACEOF |
|
14198 |
+ |
|
14199 |
+fi |
|
14200 |
+ |
|
14193 | 14201 |
echo "$as_me:$LINENO: checking for fd_set" >&5 |
14194 | 14202 |
echo $ECHO_N "checking for fd_set... $ECHO_C" >&6 |
14195 | 14203 |
cat >conftest.$ac_ext <<_ACEOF |
... | ... |
@@ -922,11 +922,26 @@ if test "$have_attrib_packed" = no; then |
922 | 922 |
AC_DEFINE(HAVE_PRAGMA_PACK, 1, "pragma pack") |
923 | 923 |
fi |
924 | 924 |
|
925 |
+dnl check for __attribute__((aligned)) |
|
926 |
+AC_MSG_CHECKING([for type aligning via __attribute__((aligned))]) |
|
927 |
+AC_CACHE_VAL(have_attrib_aligned,[ |
|
928 |
+ AC_TRY_COMPILE(, |
|
929 |
+ [typedef int cl_aligned_int __attribute__((aligned));], |
|
930 |
+ [have_attrib_aligned=yes], |
|
931 |
+ [have_attrib_aligned=no]) |
|
932 |
+ ]) |
|
933 |
+AC_MSG_RESULT($have_attrib_aligned) |
|
934 |
+ |
|
925 | 935 |
if test "$have_attrib_packed" = no -a "$have_pragma_pack" = no ; then |
926 | 936 |
AC_MSG_ERROR(Need to know how to pack structures with this compiler) |
927 | 937 |
fi |
938 |
+ |
|
928 | 939 |
if test "$have_attrib_packed" = yes; then |
929 |
- AC_DEFINE(HAVE_ATTRIB_PACKED, 1, "attrib packed") |
|
940 |
+ AC_DEFINE(HAVE_ATTRIB_PACKED, 1, [attrib packed]) |
|
941 |
+fi |
|
942 |
+ |
|
943 |
+if test "$have_attrib_aligned" = yes; then |
|
944 |
+ AC_DEFINE(HAVE_ATTRIB_ALIGNED, 1, [attrib aligned]) |
|
930 | 945 |
fi |
931 | 946 |
|
932 | 947 |
dnl Check if <sys/select.h> needs to be included for fd_set |