summaryrefslogtreecommitdiffabout
path: root/configure.ac
blob: e545dfae385f09af6c3bd6216d1e109bf0536daa (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# This file is part of Ellinika         -*- autoconf -*-
# Copyright (C) 2004, 2005, 2007, 2008, 2010, 2015 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.61)

AC_REVISION(2015-01-06 14:33:57 gray)
AC_INIT(ellinika, 1.99.99, [gray+ellinika@gnu.org.ua])
AC_CONFIG_SRCDIR(src/cgi-bin/dict.scm4)
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.11 silent-rules no-exeext])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])

# Enable silent rules by default:
AM_SILENT_RULES([yes])

## * Checks for programs.
AC_PROG_CC
AC_PROG_YACC
AM_PROG_LIBTOOL

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

AM_GNU_GETTEXT([external], [need-ngettext])

AM_GNU_GETTEXT_VERSION([0.17])

GINT_INIT(,[nodoc]) 

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_ARG_VAR([BASE_HREF],
           [Set default <base href>])
AC_ARG_VAR([TARGET_DIR],
           [(Deprecated) Set target subdirectory (under prefix)])
	   
AC_ARG_VAR([PROD_URL],
           [URL for the production site])
AC_ARG_VAR([EXP_URL],
           [URL for the experimental site])
AC_ARG_VAR([STATE],
           [EXP for experimental, PROD for production])
	   
AC_SUBST(SCRIPT_SUFFIX)
AC_SUBST(SCRIPT_DIR)		
AC_SUBST(CGIDIR)

if test $APACHE_IFACE = "CGI"; then
   SCRIPT_SUFFIX=cgi
   if test -n "$TARGET_DIR"; then
     SCRIPT_DIR=cgi-bin
   else
     SCRIPT_DIR=/cgi-bin
   fi
   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])

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
		gint/Makefile
		src/Makefile
                src/cgi-bin/Makefile
                src/ellinika/Makefile
                elisp/Makefile
                scm/Makefile
                data/Makefile
                data/pl/Makefile
                data/ru/Makefile
                xml/Makefile
                xml/pl/Makefile
                xml/ru/Makefile
                xml/uk/Makefile
		html-files/Makefile
                po/Makefile.in)

AC_OUTPUT

dnl Local variables:
dnl eval: (add-hook 'write-file-hooks 'time-stamp)
dnl time-stamp-start: "AC_REVISION("
dnl time-stamp-end: ")"
dnl time-stamp-line-limit: 20
dnl end:

Return to:

Send suggestions and report system problems to the System administrator.