/[hydra]/hydra/check_struct_for.m4
ViewVC logotype

Annotation of /hydra/check_struct_for.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Sep 26 13:46:42 2002 UTC (19 years ago) by nmav
Branch: MAIN
CVS Tags: hydra_0_1_6_without_hic, hydra_0_0_8, hydra_0_0_9, hydra_0_0_2, hydra_0_0_3, hydra_0_0_6, hydra_0_0_7, hydra_0_0_4, hydra_0_0_5, hydra_0_1_3, hydra_0_1_2, hydra_0_1_1, hydra_0_1_0, hydra_0_1_7, hydra_0_1_6, hydra_0_1_4, hydra_0_1_8, hydra_0_0_10, HEAD
Branch point for: hydra_0_1_0_patches
Added automake support.

1 nmav 1.1 AC_DEFUN([AC_CHECK_STRUCT_FOR],[
2     ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'`
3     ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'`
4     ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
5     changequote(, )dnl
6     ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7     changequote([, ])dnl
8    
9     AC_MSG_CHECKING([for $2.$3])
10     AC_CACHE_VAL($ac_safe_all,
11     [
12     if test "x$4" = "x"; then
13     defineit="= 0"
14     elif test "x$4" = "xno"; then
15     defineit=""
16     else
17     defineit="$4"
18     fi
19     AC_TRY_COMPILE([
20     $1
21     ],[
22     struct $2 testit;
23     testit.$3 $defineit;
24     ], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" )
25     ])
26    
27     if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
28     AC_MSG_RESULT(yes)
29     AC_DEFINE_UNQUOTED($ac_uc_define)
30     else
31     AC_MSG_RESULT(no)
32     fi
33     ])
34    
35     dnl AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no])
36     dnl 1.1 (2000/09/19)
37     dnl Wes Hardaker <wjhardaker@ucdavis.edu>
38    
39     dnl ----------------------------------------------------------
40    

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26