📄 aclocal.m4
字号:
dnldnl record top-level directory (this one)dnl A problem. Some systems use an NFS automounter. This can generatednl paths of the form /tmp_mnt/... . On SOME systems, that path isdnl not recognized, and you need to strip off the /tmp_mnt. On others, dnl it IS recognized, so you need to leave it in. Grumble.dnl The real problem is that OTHER nodes on the same NFS system may notdnl be able to find a directory based on a /tmp_mnt/... name.dnldnl It is WRONG to use $PWD, since that is maintained only by the C shell,dnl and if we use it, we may find the 'wrong' directory. To test this, wednl try writing a file to the directory and then looking for it in the dnl current directory. Life would be so much easier if the NFS automounterdnl worked correctly.dnldnl PAC_GETWD(varname [, filename ] )dnl dnl Set varname to current directory. Use filename (relative to currentdnl directory) if provided to double check.dnldnl Need a way to use "automounter fix" for this.dnldefine(PAC_GETWD,[AC_MSG_CHECKING(for current directory name)$1=$PWDif test "${$1}" != "" -a -d "${$1}" ; then if test -r ${$1}/.foo$$ ; then /bin/rm -f ${$1}/.foo$$ /bin/rm -f .foo$$ fi if test -r ${$1}/.foo$$ -o -r .foo$$ ; then $1= else echo "test" > ${$1}/.foo$$ if test ! -r .foo$$ ; then /bin/rm -f ${$1}/.foo$$ $1= else /bin/rm -f ${$1}/.foo$$ fi fifiif test "${$1}" = "" ; then $1=`pwd | sed -e 's%/tmp_mnt/%/%g'`fidnldnl First, test the PWD is sensibleifelse($2,,,if test ! -r ${$1}/$2 ; then dnl PWD must be messed up $1=`pwd` if test ! -r ${$1}/$2 ; then print_error "Cannot determine the root directory!" exit 1 fi $1=`pwd | sed -e 's%/tmp_mnt/%/%g'` if test ! -d ${$1} ; then print_error "Warning: your default path uses the automounter; this may" print_error "cause some problems if you use other NFS-connected systems." $1=`pwd` fifi)if test -z "${$1}" ; then $1=`pwd | sed -e 's%/tmp_mnt/%/%g'` if test ! -d ${$1} ; then print_error "Warning: your default path uses the automounter; this may" print_error "cause some problems if you use other NFS-connected systems." $1=`pwd` fifiAC_MSG_RESULT(${$1})])dnldnldnl PAC_OUTPUT_EXEC(files[,mode]) - takes files (as shell script or others),dnl and applies configure to the them. Basically, this is what AC_OUTPUTdnl should do, but without adding a comment line at the top.dnl Must be used ONLY after AC_OUTPUT (it needs config.status, which dnl AC_OUTPUT creates).dnl Optionally, set the mode (+x, a+x, etc)dnldefine(PAC_OUTPUT_EXEC,[CONFIG_FILES="$1"export CONFIG_FILES./config.statusCONFIG_FILES=""for pac_file in $1 ; do /bin/rm -f .pactmp sed -e '1d' $pac_file > .pactmp /bin/rm -f $pac_file mv .pactmp $pac_file ifelse($2,,,chmod $2 $pac_file)done])dnldnldnl We need routines to check that make works. Possible problems withdnl make includednldnl It is really gnumake, and contrary to the documentation on gnumake,dnl it insists on screaming everytime a directory is changed. The fixdnl is to add the argument --no-print-directory to the makednldnl It is really BSD 4.4 make, and can't handle 'include'. For somednl systems, this can be fatal; there is no fix (other than removing thisdnl aleged make).dnldnl It is the OSF V3 make, and can't handle a comment in a block of targednl code. There is no acceptable fix.dnldnl This assumes that "MAKE" holds the name of the make program. If itdnl determines that it is an improperly built gnumake, it addsdnl --no-print-directorytries to the symbol MAKE.define(PAC_MAKE_IS_GNUMAKE,[AC_MSG_CHECKING(gnumake)/bin/rm -f conftestcat > conftest <<.SHELL=/bin/shALL: @(dir=`pwd` ; cd .. ; \$(MAKE) -f \$\$dir/conftest SUB)SUB: @echo "success".str=`$MAKE -f conftest 2>&1`if test "$str" != "success" ; then str=`$MAKE --no-print-directory -f conftest 2>&1` if test "$str" = "success" ; then MAKE="$MAKE --no-print-directory" AC_MSG_RESULT(yes using --no-print-directory) else AC_MSG_RESULT(no) fielse AC_MSG_RESULT(no)fi/bin/rm -f confteststr=""])dnldnldnl PAC_MAKE_IS_BSD44([true text])dnldefine(PAC_MAKE_IS_BSD44,[AC_MSG_CHECKING(BSD 4.4 make)/bin/rm -f conftestcat > conftest <<.ALL: @echo "success".cat > conftest1 <<.include conftest.str=`$MAKE -f conftest1 2>&1`/bin/rm -f conftest conftest1if test "$str" != "success" ; then AC_MSG_RESULT(Found BSD 4.4 so-called make) echo "The BSD 4.4 make is INCOMPATIBLE with all other makes." echo "Using this so-called make may cause problems when building programs." echo "You should consider using gnumake instead." ifelse([$1],,[$1])else AC_MSG_RESULT(no - whew)fistr=""])dnldnldnl PAC_MAKE_IS_OSF([true text])dnldefine(PAC_MAKE_IS_OSF,[AC_MSG_CHECKING(OSF V3 make)/bin/rm -f conftestcat > conftest <<.SHELL=/bin/shALL: @# This is a valid comment! @echo "success".str=`$MAKE -f conftest 2>&1`/bin/rm -f conftest if test "$str" != "success" ; then AC_MSG_RESULT(Found OSF V3 make) echo "The OSF V3 make does not allow comments in target code." echo "Using this make may cause problems when building programs." echo "You should consider using gnumake instead." ifelse([$1],,[$1])else AC_MSG_RESULT(no)fistr=""])dnldnldnl Look for a style of VPATH. Known forms arednl VPATH = .:dirdnl .PATH: . dirdnldnl Defines VPATH or .PATH with . $(srcdir)dnl Requires that vpath work with implicit targetsdnl NEED TO DO: Check that $< works on explicit targets.dnldefine(PAC_MAKE_VPATH,[AC_SUBST(VPATH)AC_MSG_CHECKING(for virtual path format)rm -rf conftest*mkdir conftestdircat >conftestdir/a.c <<EOFA sample fileEOFcat > conftest <<EOFall: a.oVPATH=.:conftestdir.c.o: @echo \$<EOFac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'`if test -n "$ac_out" ; then AC_MSG_RESULT(VPATH) VPATH='VPATH=.:$(srcdir)'else rm -f conftest cat > conftest <<EOFall: a.o.PATH: . conftestdir.c.o: @echo \$<EOF ac_out=`$MAKE -f conftest 2>&1 | grep 'conftestdir/a.c'` if test -n "$ac_out" ; then AC_MSG_RESULT(.PATH) VPATH='.PATH: . $(srcdir)' else AC_MSG_RESULT(neither VPATH nor .PATH works) fifirm -rf conftest*])dnldnldnl PAC_MSG_ERROR($enable_softerr,ErrorMsg) - dnl return AC_MSG_ERROR(ErrorMsg) if "$enable_softerr" = "yes"dnl return AC_MSG_WARN(ErrorMsg) + exit 0 otherwisednldefine(PAC_MSG_ERROR,[if test "$1" = "yes" ; then AC_MSG_WARN([ $2 ]) exit 0else AC_MSG_ERROR([ $2 ])fi])dnldnldnldnl Include Java related definitionsbuiltin(include,aclocal_java.m4)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -