File: configure.in

package info (click to toggle)
mew-beta 7.0.50~6.8%2B0.20210131-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,400 kB
  • sloc: lisp: 37,334; ansic: 3,614; haskell: 569; sh: 439; makefile: 411; ruby: 310; perl: 61
file content (98 lines) | stat: -rw-r--r-- 2,975 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
AC_INIT(mew.el)
AC_CONFIG_SUBDIRS(bin)
AC_ARG_WITH(emacs,
    [  --with-emacs=EMACS      use EMACS],
    emacsbin="${withval}")
AC_SUBST(emacsbin)
AC_ARG_WITH(elispdir,
    [  --with-elispdir=DIR     where elisp files should go],
    elispdir="${withval}")
AC_SUBST(elispdir)
AC_ARG_WITH(etcdir,
    [  --with-etcdir=DIR       where etc files should go],
    etcdir="${withval}")
AC_SUBST(etcdir)

if test -z "${emacsbin}"; then
    AC_PATH_PROGS(emacsbin, emacs, emacs)
fi
chk_prefix=
  if test "${datadir}" = "\${prefix}/share" && \
     test -z "${elispdir}" -o -z "${etcdir}"; then
     chk_prefix=yes
  fi

if test ! -x "${emacsbin}"; then
    chk_prefix=
fi
if test "${chk_prefix}"; then
    AC_MSG_CHECKING(for prefix of ${emacsbin})
    AC_CACHE_VAL(emacsbin_cv_emacs_prefix,[
	OUTPUT=./conftest-$$
	echo ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
	eval ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
	retval="`cat ${OUTPUT}`"
	rm -f ${OUTPUT}
	emacsbin_cv_emacs_prefix="${retval}"])
    emacs_prefix=${emacsbin_cv_emacs_prefix}
    AC_MSG_RESULT(${emacs_prefix})
fi

if test "${chk_prefix}" -a -z "${elispdir}"; then
    AC_MSG_CHECKING([where lisp files should go])
    if test -d "${emacs_prefix}/share/emacs/site-lisp"; then
	elispdir="${emacs_prefix}/share/emacs/site-lisp/mew"
    fi
    if test "${elispdir}"; then
	AC_MSG_RESULT(${elispdir})
    else
	AC_MSG_RESULT([none (fall back to the default value)])
    fi
fi
if test -z "${elispdir}"; then
    elispdir="\${datadir}/emacs/site-lisp/mew"
fi

if test "${chk_prefix}" -a -z "${etcdir}"; then
    AC_MSG_CHECKING([where etc files should go])
    if test -d "${emacs_prefix}/share/emacs/site-lisp"; then
        etcdir="${emacs_prefix}/share/emacs/site-lisp/mew/etc"
    fi
    if test "${etcdir}"; then
	AC_MSG_RESULT(${etcdir})
    else
	AC_MSG_RESULT([none (fall back to the default value)])
    fi
fi
if test -z "${etcdir}"; then
   etcdir="\${datadir}/emacs/site-lisp/mew/etc"
fi

AC_OUTPUT(Makefile)

echo_value () {
    case "$1" in
    *\$*)
	eval "echo_value \"$1\""
	;;
    *)
	echo "$1"
	;;
    esac
}

echo
echo "***************************"
echo " Mew configuration results"
echo "***************************"
echo
echo $ECHO_N "use emacs             : $ECHO_C"; echo_value "${emacsbin}"
echo $ECHO_N "elisp files should go : $ECHO_C"; echo_value "${elispdir}"
echo $ECHO_N "etc files should go   : $ECHO_C"; echo_value "${etcdir}"
echo $ECHO_N "exec files should go  : $ECHO_C"; echo_value "${bindir}"
echo $ECHO_N "info files should go  : $ECHO_C"; echo_value "${infodir}"
echo $ECHO_N "man files should go   : $ECHO_C"; echo_value "${mandir}/man1"
echo
echo "Then type 'make' and 'make install'."
echo "For Japanese environment, also 'make install-jinfo'."
echo