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
|
AC_INIT(scsolver.uno, 0.1, kyoshida@novell.com)
AC_ARG_WITH(ooo,
[
--with-ooo specify the base directory path of your OOo installation.
Example: --with-ooo=/usr/lib/ooo3],
,)
AC_ARG_WITH(xls-dump,
[
--with-xls-dump specify the path of xls-dump script needed to dump the contents of xls files.
Example: --with-xls-dump=/path/to/xls-dump.py],
,)
# Mandatory system library requirements first.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
[AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
AC_LANG_RESTORE
AC_PATH_PROG(PYTHON, python)
if test -z "PYTHON"; then
AC_MSG_ERROR([python not found in your path.])
fi
AC_SUBST(PYTHON)
ROOTDIR=`pwd`
AC_SUBST(ROOTDIR)
OBJDIR=$ROOTDIR/obj
AC_SUBST(OBJDIR)
EXECDIR=$ROOTDIR/bin
AC_SUBST(EXECDIR)
OOO_INSTALL_PATH=$with_ooo
AC_MSG_CHECKING([OOo installation])
if test -f "$OOO_INSTALL_PATH/program/soffice.bin"; then
HAVE_OOO_INSTALL=yes
AC_MSG_RESULT([found])
else
HAVE_OOO_INSTALL=no
AC_MSG_RESULT([not found])
fi
if test "z$HAVE_OOO_INSTALL" != "zyes"; then
AC_MSG_ERROR([No OOo installation found. Please specify your OOo installation path with ---with-ooo=<path>.])
fi
AC_SUBST(OOO_INSTALL_PATH)
XLS_DUMP_PATH=$with_xls_dump
if test "z$XLS_DUMP_PATH" == "z"; then
AC_MSG_ERROR([Please specify the location of xls-dump with --with-xls-dump=<path>.])
fi
AC_CHECK_FILE($XLS_DUMP_PATH, [],
[AC_MSG_ERROR($XLS_DUMP_PATH not found.)], [])
AC_SUBST(XLS_DUMP_PATH)
SOLVER_PATH=$OOO_INSTALL_PATH/solver
UNOHEADER_PATH=$SOLVER_PATH/inc/offuh
BINDIR=$SOLVER_PATH/bin
AC_SUBST(SOLVER_PATH)
AC_SUBST(UNOHEADER_PATH)
AC_SUBST(BINDIR)
AC_CHECK_FILE($SOLVER_PATH/inc/cppuhelper/bootstrap.hxx, [],
[AC_MSG_ERROR($SOLVER_PATH/inc/cppuhelper/bootstrap.hxx not found.)], [])
RUNTIME_LIB_PATH=$OOO_INSTALL_PATH/program
AC_SUBST(RUNTIME_LIB_PATH)
AC_OUTPUT(Makefile)
AC_OUTPUT(run-test.sh)
AC_OUTPUT(setenv.sh)
|