aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: de843af507c0c8c63a4e6539b885459accbf76f3 (plain)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# This file is part of Ellinika         -*- autoconf -*-
# Copyright (C) 2004, 2005, 2007 Sergey Poznyakoff
#
# Ellinika is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Ellinika is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

AC_PREREQ(2.59)

AC_REVISION($Revision$)
AC_INIT(ellinika, 1.2, [gray@gnu.org.ua])
AC_CONFIG_SRCDIR(cgi-bin/dict.scm4)
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(no-exeext)

## * Checks for programs.

M4='`cd $(top_srcdir); pwd`/scripts/missing --run m4'
AC_SUBST(M4)

AM_GNU_GETTEXT(external, need-ngettext)
AM_GNU_GETTEXT_VERSION(0.14.1)

MU_CHECK_GUILE(,,
               [AC_MSG_ERROR([You need Guile 1.6 or better])])

RA_CHECK_LIB(mysqlclient, 
             mysql_real_connect, 
             [-lm],
             [],
 	     [AC_MSG_FAILURE([The required library libmysqlclient is not found or is unusable])],
             [/usr/local/lib/mysql /usr/lib/mysql])

LIBS="$LIBS $ra_cv_lib_mysqlclient"

## **************
## Directories
## **************

AC_SUBST(GUILE_BINDIR)
GUILE_BINDIR=`guile-config info bindir`

case `guile -c "(display (member \"$GUILE_SITE\" %load-path))(newline)"` in
\#f) GUILE_COMMENT=;;
*)   GUILE_COMMENT=";;" ;;
esac

AC_SUBST(GUILE_COMMENT)
AC_SUBST(GUILE_SITE)


HTMLDIR='$(prefix)/ellinika'
AC_ARG_WITH(html-dir,
	AC_HELP_STRING([--with-html-dir=DIR],
	[install HTML pages in DIR [[PREFIX/ellinika]]]),
	[HTMLDIR=$withval])
AC_SUBST(HTMLDIR)

AC_SUBST(APACHE_IFACE,CGI)
AC_ARG_ENABLE(cgi,
	AC_HELP_STRING([--enable-cgi],
	[Use CGI or SCM]),
	[case $enableval in
	yes) APACHE_IFACE=CGI;;
	no)  APACHE_IFACE=SCM;;
	*)   AC_MSG_ERROR([unknown argument to --enable-cgi])
	esac])

AC_SUBST(SCRIPT_SUFFIX)
AC_SUBST(SCRIPT_DIR)		
AC_SUBST(CGIDIR)
if test $APACHE_IFACE = "CGI"; then
   SCRIPT_SUFFIX=cgi
   SCRIPT_DIR=/cgi-name
   CGIDIR='$(prefix)/cgi-bin'
else
   SCRIPT_SUFFIX=scm
   SCRIPT_DIR=/scm
   CGIDIR='$(prefix)/scm'
fi      
	
AC_ARG_WITH(cgi-bin,
	AC_HELP_STRING([--with-cgi-bin=DIR],
	[install CGI programs in DIR [[PREFIX/cgi-bin]]]),
	[CGIDIR=$withval])

AC_SUBST(BASE_HREF)
AC_SUBST(TARGET_DIR)

dnl Check for Emacs site-lisp directory
AM_PATH_LISPDIR
if test "$EMACS" != "no"; then
	lisp_LISP='$(LISPSRC)'
fi
AC_SUBST(lisp_LISP)

AC_SUBST(AUTOGENERATED,
	 ";;;; This file is generated automatically. Please do not edit. -*- buffer-read-only: t -*- vi: set ro:")

AC_CONFIG_FILES(Makefile
	        .htaccess
                cgi-bin/Makefile
                elisp/Makefile
                data/Makefile
                scm/Makefile
                ellinika/Makefile
                xml/Makefile
                xml/pl/Makefile
                xml/ru/Makefile
                xml/uk/Makefile
                po/Makefile.in)

AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.