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) AC_PATH_PROG(DIFF, diff) if test -z "DIFF"; then AC_MSG_ERROR([diff not found in your path.]) fi AC_SUBST(DIFF) 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=.]) 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=.]) 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)