"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "gnus-5.10.10/aclocal.m4" of archive gnus-5.10.10.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 # serial 1
    2 
    3 AC_DEFUN(AM_PATH_LISPDIR,
    4  [# If set to t, that means we are running in a shell under Emacs.
    5   # If you have an Emacs named "t", then use the full path.
    6   test "$EMACS" = t && EMACS=
    7   test "$EMACS" || AC_PATH_PROGS(EMACS, emacs xemacs, no)
    8   if test "$EMACS" != "no"; then
    9     AC_MSG_CHECKING([where .elc files should go])
   10     dnl Set default value
   11     lispdir="\$(datadir)/emacs/site-lisp"
   12     if test "x$prefix" = "xNONE"; then
   13       if test -d $ac_default_prefix/share/emacs/site-lisp; then
   14 	lispdir="\$(prefix)/share/emacs/site-lisp"
   15       else
   16 	if test -d $ac_default_prefix/lib/emacs/site-lisp; then
   17 	  lispdir="\$(prefix)/lib/emacs/site-lisp"
   18 	fi
   19       fi
   20     else
   21       if test -d $prefix/share/emacs/site-lisp; then
   22 	lispdir="\$(prefix)/share/emacs/site-lisp"
   23       else
   24 	if test -d $prefix/lib/emacs/site-lisp; then
   25 	  lispdir="\$(prefix)/lib/emacs/site-lisp"
   26 	fi
   27       fi
   28     fi
   29     AC_MSG_RESULT($lispdir)
   30   fi
   31   AC_SUBST(lispdir)])
   32 
   33 dnl AC_EMACS_LIST AC_XEMACS_P AC_PATH_LISPDIR and AC_EMACS_CHECK_LIB
   34 dnl are stolen from w3.
   35 dnl AC_PATH_LISPDIR obsoletes AM_PATH_LISPDIR.
   36 
   37 AC_DEFUN(AC_EMACS_LISP, [
   38 elisp="$2"
   39 if test -z "$3"; then
   40 	AC_MSG_CHECKING(for $1)
   41 fi
   42 AC_CACHE_VAL(EMACS_cv_SYS_$1,[
   43 	OUTPUT=./conftest-$$
   44 	echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& AC_FD_CC 2>&1  
   45 	${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& AC_FD_CC 2>&1
   46 	retval=`cat ${OUTPUT}`
   47 	echo "=> ${retval}" >& AC_FD_CC 2>&1
   48 	rm -f ${OUTPUT}
   49 	EMACS_cv_SYS_$1=$retval
   50 ])
   51 $1=${EMACS_cv_SYS_$1}
   52 if test -z "$3"; then
   53 	AC_MSG_RESULT($$1)
   54 fi
   55 ])
   56 
   57 AC_DEFUN(AC_XEMACS_P, [
   58   AC_MSG_CHECKING([if $EMACS is really XEmacs])
   59   AC_EMACS_LISP(xemacsp,(if (string-match \"XEmacs\" emacs-version) \"yes\" \"no\") ,"noecho")
   60   XEMACS=${EMACS_cv_SYS_xemacsp}
   61   EMACS_FLAVOR=emacs
   62   if test "$XEMACS" = "yes"; then
   63      EMACS_FLAVOR=xemacs
   64   fi
   65   AC_MSG_RESULT($XEMACS)
   66   AC_SUBST(XEMACS)
   67   AC_SUBST(EMACS_FLAVOR)
   68 ])
   69 
   70 AC_DEFUN(AC_PATH_LISPDIR, [
   71   AC_XEMACS_P
   72   if test "$prefix" = "NONE"; then
   73 	AC_MSG_CHECKING([prefix for your Emacs])
   74 	AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho")
   75 	prefix=${EMACS_cv_SYS_prefix}
   76 	AC_MSG_RESULT($prefix)
   77   fi
   78   AC_ARG_WITH(lispdir,[  --with-lispdir=DIR      Where to install lisp files], lispdir=${withval})
   79   AC_MSG_CHECKING([where .elc files should go])
   80   if test -z "$lispdir"; then
   81     dnl Set default value
   82     theprefix=$prefix
   83     if test "x$theprefix" = "xNONE"; then
   84 	theprefix=$ac_default_prefix
   85     fi
   86     if test "$EMACS_FLAVOR" = "xemacs"; then
   87         datadir="\$(prefix)/lib"
   88         lispdir="\$(datadir)/${EMACS_FLAVOR}/site-packages/lisp/gnus"
   89     else
   90     lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/gnus"
   91     fi
   92     for thedir in share lib; do
   93 	potential=
   94 	dnl The directory name should be quoted because it might contain spaces.
   95 	if test -d "${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp"; then
   96            if test "$EMACS_FLAVOR" = "xemacs"; then
   97 	       lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/lisp/gnus"
   98            else
   99                lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/gnus"
  100            fi
  101 	   break
  102 	fi
  103     done
  104   fi
  105   AC_MSG_RESULT($lispdir)
  106   AC_SUBST(lispdir)
  107 ])
  108 
  109 AC_DEFUN(AC_PATH_ETCDIR, [
  110   AC_ARG_WITH(etcdir,[  --with-etcdir=DIR       Where to install etc files], etcdir=${withval})
  111   AC_MSG_CHECKING([where etc files should go])
  112   if test -z "$etcdir"; then
  113     dnl Set default value.
  114     if test "$EMACS_FLAVOR" = "xemacs"; then
  115       etcdir="\$(lispdir)/../../etc"
  116     else
  117       etcdir="\$(lispdir)/../../etc"
  118     fi
  119   fi
  120   AC_MSG_RESULT($etcdir)
  121   AC_SUBST(etcdir)
  122 ])
  123 
  124 dnl 
  125 dnl This is a bit on the "evil hack" side of things.  It is so we can
  126 dnl have a different default infodir for XEmacs.  A user can still specify
  127 dnl someplace else with '--infodir=DIR'.
  128 dnl
  129 AC_DEFUN(AC_PATH_INFO_DIR, [
  130   AC_MSG_CHECKING([where the TeXinfo docs should go])
  131   dnl Set default value.  This must be an absolute path.
  132   if test "$infodir" = "\${prefix}/info"; then
  133     if test "$EMACS_FLAVOR" = "xemacs"; then
  134       info_dir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-packages/info"
  135     else
  136       info_dir="\$(prefix)/info"
  137     fi
  138   else
  139     info_dir=$infodir
  140   fi
  141   AC_MSG_RESULT($info_dir)
  142   AC_SUBST(info_dir)
  143 ])
  144 
  145 dnl
  146 dnl This will set the XEmacs command line options to be slightly different
  147 dnl from the Emacs ones.  If building with XEmacs the options will be
  148 dnl "-batch -no-autoloads..." to give a much cleaner build environment.
  149 dnl
  150 AC_DEFUN(AC_SET_BUILD_FLAGS, [
  151   AC_MSG_CHECKING([which options to pass on to (X)Emacs])
  152   if test "x$FLAGS" = "x"; then
  153     if test "$EMACS_FLAVOR" = "xemacs"; then
  154       FLAGS="-batch -no-autoloads -l \$(srcdir)/dgnushack.el"
  155     else
  156       FLAGS="-batch -q -no-site-file -l \$(srcdir)/dgnushack.el"
  157     fi
  158   else
  159     FLAGS=$FLAGS
  160   fi
  161   AC_MSG_RESULT($FLAGS)
  162   AC_SUBST(FLAGS)
  163 ])
  164 
  165 dnl
  166 dnl Check whether a function exists in a library
  167 dnl All '_' characters in the first argument are converted to '-'
  168 dnl
  169 AC_DEFUN(AC_EMACS_CHECK_LIB, [
  170 if test -z "$3"; then
  171 	AC_MSG_CHECKING(for $2 in $1)
  172 fi
  173 library=`echo $1 | tr _ -`
  174 AC_EMACS_LISP($1,(progn (fmakunbound '$2) (condition-case nil (progn (require '$library) (fboundp '$2)) (error (prog1 nil (message \"$library not found\"))))),"noecho")
  175 if test "${EMACS_cv_SYS_$1}" = "nil"; then
  176 	EMACS_cv_SYS_$1=no
  177 fi
  178 if test "${EMACS_cv_SYS_$1}" = "t"; then
  179 	EMACS_cv_SYS_$1=yes
  180 fi
  181 HAVE_$1=${EMACS_cv_SYS_$1}
  182 AC_SUBST(HAVE_$1)
  183 if test -z "$3"; then
  184 	AC_MSG_RESULT($HAVE_$1)
  185 fi
  186 ])
  187 
  188 dnl
  189 dnl Perform sanity checking and try to locate the W3 package
  190 dnl
  191 AC_DEFUN(AC_CHECK_W3, [
  192 AC_MSG_CHECKING(for acceptable W3 version)
  193 AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[
  194 AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho")
  195 if test "${HAVE_w3_forms}" = "yes"; then
  196 	EMACS_cv_ACCEPTABLE_W3=yes
  197 else
  198 	EMACS_cv_ACCEPTABLE_W3=no
  199 fi
  200 
  201 if test "${EMACS_cv_ACCEPTABLE_W3}" = "yes"; then
  202 	AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho")
  203 	EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
  204 fi
  205 ])
  206    AC_ARG_WITH(w3,[  --with-w3=DIR           Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
  207    W3=${EMACS_cv_ACCEPTABLE_W3}
  208    AC_SUBST(W3)
  209    AC_MSG_RESULT("${W3}")
  210 ])
  211 
  212 dnl
  213 dnl Perform sanity checking and try to locate the W3 package
  214 dnl
  215 AC_DEFUN(AC_CHECK_URL, [
  216 AC_MSG_CHECKING(for acceptable URL version)
  217 AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[
  218 AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho")
  219 if test "${HAVE_url}" = "yes"; then
  220 	EMACS_cv_ACCEPTABLE_URL=yes
  221 else
  222 	EMACS_cv_ACCEPTABLE_URL=no
  223 fi
  224 
  225 if test "${EMACS_cv_ACCEPTABLE_URL}" = "yes"; then
  226 	AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho")
  227 	EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
  228 fi
  229 ])
  230    AC_ARG_WITH(url,[  --with-url=DIR          Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
  231    URL=${EMACS_cv_ACCEPTABLE_URL}
  232    AC_SUBST(URL)
  233    AC_MSG_RESULT("${URL}")
  234 ])
  235 
  236 dnl
  237 dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and 
  238 dnl Bitstream Courier.
  239 dnl
  240 
  241 AC_DEFUN(GNUS_CHECK_FONTS, [
  242 test "$LATEX" = t && LATEX=
  243 test "$LATEX" || AC_PATH_PROGS(LATEX, latex, no)
  244 AC_MSG_CHECKING(for available fonts)
  245 AC_ARG_WITH(fonts,[  --with-fonts            Assume all fonts required are available],[USE_FONTS="$withval"])
  246 WITH_FONTS_bembo='%'
  247 WITHOUT_FONTS_bembo=
  248 WITH_FONTS_pfu='%'
  249 WITHOUT_FONTS_pfu=
  250 WITH_FONTS_bcr='%'
  251 WITHOUT_FONTS_bcr=
  252 if test -z "${USE_FONTS}"; then
  253   if test "${LATEX}" = no; then
  254 	:
  255   else
  256     OUTPUT=./conftest-$$
  257     echo '\nonstopmode\documentclass{article}\usepackage{bembo}\begin{document}\end{document}' > ${OUTPUT}
  258     if ${LATEX} ${OUTPUT} </dev/null >& AC_FD_CC 2>&1  ; then  
  259       if test -z "${USE_FONTS}"; then
  260 	USE_FONTS="Adobe Bembo"
  261       else
  262 	USE_FONTS="${USE_FONTS}, Adobe Bembo"
  263       fi
  264       WITH_FONTS_bembo=
  265       WITHOUT_FONTS_bembo='%'
  266     fi
  267     echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
  268     if retval=`${LATEX} ${OUTPUT} </dev/null 2>& AC_FD_CC`; then
  269       if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1  ; then  
  270 	:
  271       else
  272         if test -z "${USE_FONTS}"; then
  273 	  USE_FONTS="Adobe Futura"
  274         else
  275 	  USE_FONTS="${USE_FONTS}, Adobe Futura"
  276         fi
  277         WITH_FONTS_pfu=
  278         WITHOUT_FONTS_pfu='%'
  279       fi
  280     fi
  281     echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{bcr}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
  282     if retval=`${LATEX} ${OUTPUT} </dev/null 2>& AC_FD_CC`; then
  283       if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1  ; then  
  284 	:
  285       else
  286         if test -z "${USE_FONTS}"; then
  287 	  USE_FONTS="Bitstream Courier"
  288         else
  289 	  USE_FONTS="${USE_FONTS}, Bitstream Courier"
  290         fi
  291         WITH_FONTS_bcr=
  292         WITHOUT_FONTS_bcr='%'
  293       fi
  294     fi
  295     rm -f ${OUTPUT} ${OUTPUT}.aux ${OUTPUT}.log ${OUTPUT}.dvi
  296   fi
  297 elif test "${USE_FONTS}" = yes ; then
  298   WITH_FONTS_bembo=
  299   WITHOUT_FONTS_bembo='%'
  300   WITH_FONTS_pfu=
  301   WITHOUT_FONTS_pfu='%'
  302   WITH_FONTS_bcr=
  303   WITHOUT_FONTS_bcr='%'
  304 fi
  305 AC_SUBST(WITH_FONTS_bembo)
  306 AC_SUBST(WITHOUT_FONTS_bembo)
  307 AC_SUBST(WITH_FONTS_pfu)
  308 AC_SUBST(WITHOUT_FONTS_pfu)
  309 AC_SUBST(WITH_FONTS_bcr)
  310 AC_SUBST(WITHOUT_FONTS_bcr)
  311 if test -z "${USE_FONTS}" ; then
  312   USE_FONTS=no
  313 fi
  314 USE_FONTS=`echo "${USE_FONTS}" | sed 's/,\([[^,]]*\)$/ and\1/'`
  315 AC_MSG_RESULT("${USE_FONTS}")
  316 if test "${USE_FONTS}" = yes ; then
  317   USE_FONTS='Set in Adobe Bembo, Adobe Futura and Bitstream Courier.'
  318 elif test "${USE_FONTS}" = no ; then
  319   USE_FONTS=''
  320 else
  321   USE_FONTS="Set in ${USE_FONTS}."
  322 fi
  323 AC_SUBST(USE_FONTS)
  324 ])
  325 
  326 ifelse(dnl	Do not change this comment
  327    arch-tag: 5c987641-c3ef-4f12-b067-028302282c66
  328 )dnl