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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# configure.ac for ngspice-doc
# Copyright (C) 2023 Holger Vogt
# (C) 2018 Carsten Schoenert <c.schoenert@...>
#
# This file is part of the ngspice-doc. Please see README and COPYING for
# terms of use.
#
# SPDX-License-Identifier: CC-BY-SA-4.0
# To regenerate the configure script call
# autoreconf -vi
AC_INIT(ngspice-doc,39,[http://ngspice.sourceforge.net/bugrep.html])
AC_PREREQ(2.61)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
# The minimum required LyX version for building the documentation.
# This is the LyX version the file manual.lyx was created with.
lyx_version_required=2.3
AC_CHECK_PROG([LYX],
lyx,
[yes],
[no],
[$PATH])
if test "x$LYX" = "xyes"; then
# There is no easy way to detect the installed version of lyx.
lyx_version=`lyx -version | head -1 | awk '{print $2}'`
AS_VERSION_COMPARE([$lyx_version],
[$lyx_version_required],
[AC_MSG_ERROR([Lyx version $lyx_version found, but at least $lyx_version_required needed])]
[AC_MSG_RESULT([yes $lyx_version])],
[AC_MSG_RESULT([yes $lyx_version])])
else
echo
AC_MSG_ERROR([The LyX package was not found!])
fi
AC_ARG_WITH([lyxuserdir],
[AS_HELP_STRING([--with-lyxuserdir=DIR],
[use a dedicated Lyx user directory])],
[with_lyxuserdir="$withval"],
[with_lyxuserdir="no"])
# If the user has given the option '--with-lyxuserdir' substitute the given
# argument into the Makefile.
if test "x$with_lyxuserdir" != "xno"; then
LYX_USER_DIR="-userdir $with_lyxuserdir"
AC_MSG_NOTICE([==> LYX_USER_DIR is configured to '$with_lyxuserdir'.])
else
LYX_USER_DIR=""
fi
AC_SUBST([LYX_USER_DIR])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|