"Fossies" - the Fresh Open Source Software Archive

Member "openmpi-4.1.2/ompi/mca/io/romio321/romio/confdb/aclocal_make.m4" (24 Nov 2021, 7982 Bytes) of package /linux/misc/openmpi-4.1.2.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 dnl
    2 dnl We need routines to check that make works.  Possible problems with
    3 dnl make include
    4 dnl
    5 dnl It is really gnumake, and contrary to the documentation on gnumake,
    6 dnl it insists on screaming everytime a directory is changed.  The fix
    7 dnl is to add the argument --no-print-directory to the make
    8 dnl
    9 dnl It is really BSD 4.4 make, and can't handle 'include'.  For some
   10 dnl systems, this can be fatal; there is no fix (other than removing this
   11 dnl alleged make).
   12 dnl
   13 dnl It is the OSF V3 make, and can't handle a comment in a block of target
   14 dnl code.  There is no acceptable fix.
   15 dnl
   16 dnl
   17 dnl
   18 dnl
   19 dnl Find a make program if none is defined.
   20 AC_DEFUN([PAC_PROG_MAKE_PROGRAM],[true
   21 if test "X$MAKE" = "X" ; then
   22    AC_CHECK_PROGS(MAKE,make gnumake nmake pmake smake)
   23 fi
   24 ])dnl
   25 
   26 dnl/*D
   27 dnl PAC_PROG_MAKE_INCLUDE - Check whether make supports include
   28 dnl
   29 dnl Synopsis:
   30 dnl PAC_PROG_MAKE_INCLUDE([action if true],[action if false])
   31 dnl
   32 dnl Output Effect:
   33 dnl   None
   34 dnl
   35 dnl Notes:
   36 dnl  This checks for makes that do not support 'include filename'.  Some
   37 dnl  versions of BSD 4.4 make required '#include' instead; some versions of
   38 dnl  'pmake' have the same syntax.
   39 dnl
   40 dnl See Also:
   41 dnl  PAC_PROG_MAKE
   42 dnl
   43 dnl D*/
   44 AC_DEFUN([PAC_PROG_MAKE_INCLUDE],[
   45 AC_CACHE_CHECK([whether make supports include],pac_cv_prog_make_include,[
   46 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
   47 # This is needed for Mac OSX 10.5
   48 rm -rf conftest.dSYM
   49 rm -f conftest
   50 cat > conftest <<.
   51 ALL:
   52 	@echo "success"
   53 .
   54 cat > conftest1 <<.
   55 include conftest
   56 .
   57 pac_str=`$MAKE -f conftest1 2>&1`
   58 # This is needed for Mac OSX 10.5
   59 rm -rf conftest.dSYM
   60 rm -f conftest conftest1
   61 if test "$pac_str" != "success" ; then
   62     pac_cv_prog_make_include="no"
   63 else
   64     pac_cv_prog_make_include="yes"
   65 fi
   66 ])
   67 if test "$pac_cv_prog_make_include" = "no" ; then
   68     ifelse([$2],,:,[$2])
   69 else
   70     ifelse([$1],,:,[$1])
   71 fi
   72 ])dnl
   73 
   74 dnl/*D
   75 dnl PAC_PROG_MAKE_ALLOWS_COMMENTS - Check whether comments are allowed in 
   76 dnl   shell commands in a makefile
   77 dnl
   78 dnl Synopsis:
   79 dnl PAC_PROG_MAKE_ALLOWS_COMMENTS([false text])
   80 dnl
   81 dnl Output Effect:
   82 dnl Issues a warning message if comments are not allowed in a makefile.
   83 dnl Executes the argument if one is given.
   84 dnl
   85 dnl Notes:
   86 dnl Some versions of OSF V3 make do not all comments in action commands.
   87 dnl
   88 dnl See Also:
   89 dnl  PAC_PROG_MAKE
   90 dnl D*/
   91 dnl
   92 AC_DEFUN([PAC_PROG_MAKE_ALLOWS_COMMENTS],[
   93 AC_CACHE_CHECK([whether make allows comments in actions],
   94 pac_cv_prog_make_allows_comments,[
   95 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
   96 # This is needed for Mac OSX 10.5
   97 rm -rf conftest.dSYM
   98 rm -f conftest
   99 cat > conftest <<.
  100 SHELL=/bin/sh
  101 ALL:
  102 	@# This is a valid comment!
  103 	@echo "success"
  104 .
  105 pac_str=`$MAKE -f conftest 2>&1`
  106 # This is needed for Mac OSX 10.5
  107 rm -rf conftest.dSYM
  108 rm -f conftest 
  109 if test "$pac_str" != "success" ; then
  110     pac_cv_prog_make_allows_comments="no"
  111 else
  112     pac_cv_prog_make_allows_comments="yes"
  113 fi
  114 ])
  115 if test "$pac_cv_prog_make_allows_comments" = "no" ; then
  116     AC_MSG_WARN([Your make does not allow comments in target code.
  117 Using this make may cause problems when building programs.
  118 You should consider using gnumake instead.])
  119     ifelse([$1],,[$1])
  120 fi
  121 ])dnl
  122 
  123 dnl/*D
  124 dnl PAC_PROG_MAKE_VPATH - Check whether make supports source-code paths.
  125 dnl
  126 dnl Synopsis:
  127 dnl PAC_PROG_MAKE_VPATH
  128 dnl
  129 dnl Output Effect:
  130 dnl Sets the variable 'VPATH' to either
  131 dnl.vb
  132 dnl VPATH = .:${srcdir}
  133 dnl.ve
  134 dnl or
  135 dnl.vb
  136 dnl .PATH: . ${srcdir}
  137 dnl.ve
  138 dnl 
  139 dnl Notes:
  140 dnl The test checks that the path works with implicit targets (some makes
  141 dnl support only explicit targets with 'VPATH' or 'PATH').
  142 dnl
  143 dnl NEED TO DO: Check that $< works on explicit targets.
  144 dnl
  145 dnl See Also:
  146 dnl PAC_PROG_MAKE
  147 dnl
  148 dnl D*/
  149 AC_DEFUN([PAC_PROG_MAKE_VPATH],[
  150 AC_SUBST(VPATH)
  151 dnl AM_IGNORE(VPATH)
  152 AC_CACHE_CHECK([for virtual path format],
  153 pac_cv_prog_make_vpath,[
  154 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
  155 # This is needed for Mac OSX 10.5
  156 rm -rf conftest.dSYM
  157 rm -rf conftest*
  158 mkdir conftestdir
  159 cat >conftestdir/a.c <<EOF
  160 A sample file
  161 EOF
  162 cat > conftest <<EOF
  163 all: a.o
  164 VPATH=.:conftestdir
  165 .c.o:
  166 	@echo \$<
  167 EOF
  168 ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'`
  169 if test -n "$ac_out" ; then 
  170     pac_cv_prog_make_vpath="VPATH"
  171 else
  172     rm -f conftest
  173     cat > conftest <<EOF
  174 all: a.o
  175 .PATH: . conftestdir
  176 .c.o:
  177 	@echo \$<
  178 EOF
  179     ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'`
  180     if test -n "$ac_out" ; then 
  181         pac_cv_prog_make_vpath=".PATH"
  182     else
  183 	pac_cv_prog_make_vpath="neither VPATH nor .PATH works"
  184     fi
  185 fi
  186 # This is needed for Mac OSX 10.5
  187 rm -rf conftest.dSYM
  188 rm -rf conftest*
  189 ])
  190 if test "$pac_cv_prog_make_vpath" = "VPATH" ; then
  191     VPATH='VPATH=.:${srcdir}'
  192 elif test "$pac_cv_prog_make_vpath" = ".PATH" ; then
  193     VPATH='.PATH: . ${srcdir}'
  194 fi
  195 ])dnl
  196 
  197 dnl/*D
  198 dnl PAC_PROG_MAKE_SET_CFLAGS - Check whether make sets CFLAGS
  199 dnl
  200 dnl Synopsis:
  201 dnl PAC_PROG_MAKE_SET_CFLAGS([action if true],[action if false])
  202 dnl
  203 dnl Output Effects:
  204 dnl Executes the first argument if 'CFLAGS' is set by 'make'; executes
  205 dnl the second argument if 'CFLAGS' is not set by 'make'.
  206 dnl
  207 dnl Notes:
  208 dnl If 'CFLAGS' is set by make, you may wish to override that choice in your
  209 dnl makefile.
  210 dnl
  211 dnl See Also:
  212 dnl PAC_PROG_MAKE
  213 dnl D*/
  214 AC_DEFUN([PAC_PROG_MAKE_SET_CFLAGS],[
  215 AC_CACHE_CHECK([whether make sets CFLAGS],
  216 pac_cv_prog_make_set_cflags,[
  217 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
  218 # This is needed for Mac OSX 10.5
  219 rm -rf conftest.dSYM
  220 rm -f conftest
  221 cat > conftest <<EOF
  222 SHELL=/bin/sh
  223 ALL:
  224 	@echo X[\$]{CFLAGS}X
  225 EOF
  226 pac_str=`$MAKE -f conftest 2>&1`
  227 # This is needed for Mac OSX 10.5
  228 rm -rf conftest.dSYM
  229 rm -f conftest 
  230 if test "$pac_str" = "XX" ; then
  231     pac_cv_prog_make_set_cflags="no"
  232 else
  233     pac_cv_prog_make_set_cflags="yes"
  234 fi
  235 ])
  236 if test "$pac_cv_prog_make_set_cflags" = "no" ; then
  237     ifelse([$2],,:,[$2])
  238 else
  239     ifelse([$1],,:,[$1])
  240 fi
  241 ])dnl
  242 
  243 dnl/*D
  244 dnl PAC_PROG_MAKE_CLOCK_SKEW - Check whether there is a problem with 
  245 dnl clock skew in suing make.
  246 dnl
  247 dnl Effect:
  248 dnl Sets the cache variable 'pac_cv_prog_make_found_clock_skew' to yes or no
  249 dnl D*/
  250 AC_DEFUN([PAC_PROG_MAKE_CLOCK_SKEW],[
  251 AC_CACHE_CHECK([whether clock skew breaks make],
  252 pac_cv_prog_make_found_clock_skew,[
  253 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
  254 # This is needed for Mac OSX 10.5
  255 rm -rf conftest.dSYM
  256 rm -f conftest*
  257 cat > conftest <<EOF
  258 ALL:
  259 	@-echo "success"
  260 EOF
  261 $MAKE -f conftest > conftest.out 2>&1
  262 if grep -i skew conftest >/dev/null 2>&1 ; then
  263     pac_cv_prog_make_found_clock_skew=yes
  264 else
  265     pac_cv_prog_make_found_clock_skew=no
  266 fi
  267 # This is needed for Mac OSX 10.5
  268 rm -rf conftest.dSYM
  269 rm -f conftest*
  270 ])
  271 dnl We should really do something if we detect clock skew.  The question is,
  272 dnl what?
  273 if test "$pac_cv_prog_make_found_clock_skew" = "yes" ; then
  274     AC_MSG_WARN([Clock skew found by make.  The configure and build may fail.
  275 Consider building in a local instead of NFS filesystem.])
  276 fi
  277 ])
  278 
  279 dnl/*D
  280 dnl PAC_PROG_MAKE - Checks for the varieties of MAKE, including support for 
  281 dnl VPATH
  282 dnl
  283 dnl Synopsis:
  284 dnl PAC_PROG_MAKE
  285 dnl
  286 dnl Output Effect:
  287 dnl Sets 'MAKE' to the make program to use if 'MAKE' is not already set.
  288 dnl Sets the variable 'SET_CFLAGS' to 'CFLAGS =' if make sets 'CFLAGS'.
  289 dnl
  290 dnl Notes:
  291 dnl This macro uses 'PAC_PROG_MAKE_INCLUDE',
  292 dnl 'PAC_PROG_MAKE_ALLOWS_COMMENTS', 'PAC_PROG_MAKE_VPATH', and
  293 dnl 'PAC_PROG_MAKE_SET_CFLAGS'.  See those commands for details about their
  294 dnl actions.
  295 dnl 
  296 dnl It may call 'AC_PROG_MAKE_SET', which sets 'SET_MAKE' to 'MAKE = @MAKE@'
  297 dnl if the make program does not set the value of make, otherwise 'SET_MAKE'
  298 dnl is set to empty; if the make program echos the directory name, then 
  299 dnl 'SET_MAKE' is set to 'MAKE = $MAKE'.
  300 dnl D*/
  301 AC_DEFUN([PAC_PROG_MAKE],[
  302 PAC_PROG_MAKE_PROGRAM
  303 PAC_PROG_MAKE_CLOCK_SKEW
  304 PAC_PROG_MAKE_INCLUDE
  305 PAC_PROG_MAKE_ALLOWS_COMMENTS
  306 PAC_PROG_MAKE_VPATH
  307 AC_SUBST(SET_CFLAGS)
  308 dnl AM_IGNORE(SET_CFLAGS)
  309 PAC_PROG_MAKE_SET_CFLAGS([SET_CFLAGS='CFLAGS='])
  310 if test "$pac_cv_prog_make_echos_dir" = "no" ; then
  311     AC_PROG_MAKE_SET
  312 else
  313     SET_MAKE="MAKE=${MAKE-make}"
  314 fi
  315 ])