Skip to content
Snippets Groups Projects
Commit 67b47aab authored by Christoph Knote's avatar Christoph Knote
Browse files

Switch to GNU autotools

parent f7687d0f
No related branches found
No related tags found
No related merge requests found
Showing
with 1231 additions and 26 deletions
boxmox/boxmox/README.aux
boxmox/boxmox/README.log
boxmox/boxmox/README.toc
boxmox/boxmox/README.pdf
boxmox/boxmox/compiled_mechs
boxmox/bin/kpp
boxmox/src/*.o
boxmox/src/lex.yy.c
boxmox/src/y.tab.c
boxmox/src/y.tab.h
**.DS_Store
\ No newline at end of file
bin/
share
build
doc/boxmox_README.pdf
**.DS_Store
# http://www.gnu.org/software/automake
Makefile.in
/ar-lib
/mdate-sh
/py-compile
/test-driver
/ylwrap
.deps/
.dirstamp
# http://www.gnu.org/software/autoconf
autom4te.cache
/autoscan.log
/autoscan-*.log
/aclocal.m4
/compile
/config.cache
/config.guess
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.scan
/depcomp
/install-sh
/missing
/stamp-h1
# https://www.gnu.org/software/libtool/
/ltmain.sh
# http://www.gnu.org/software/texinfo
/texinfo.tex
# http://www.gnu.org/software/m4/
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
# Generated Makefile
# (meta build system like autotools,
# can automatically generate from config.status script
# (which is called by configure script))
Makefile
\ No newline at end of file
......@@ -29,17 +29,10 @@
#
#######################################################################################
SUBDIRS = src
dist_doc_DATA = README.md
boxmox_clean:
@rm -f boxmox/README.pdf boxmox/README.aux boxmox/README.log boxmox/README.toc
boxmox_doc:
@echo "Tex'ing BOXMOX readme (boxmox/README.pdf, if pdflatex is available)"
-cd boxmox; pdflatex README.tex
-cd boxmox; pdflatex README.tex
boxmox: boxmox_doc
@echo "Setting the execute bit for user commands"
@chmod +x boxmox/bin/*
SUBDIRS = src doc
dist_doc_DATA = README.md doc/kpp_UserManual.pdf doc/boxmox_README.pdf
dist_bin_SCRIPTS = scripts/list_BOXMOX_mechanisms \
scripts/new_BOXMOX_experiment \
scripts/new_BOXMOX_experiment_from_example \
scripts/prepare_BOXMOX_mechanism \
scripts/validate_BOXMOX_installation
dnl run `autoreconf -i` to generate a configure script.
dnl Then run ./configure to generate a Makefile.
dnl Finally run make to generate the project.
m4_include([latex_autoconf_macros/ac_prog_pdflatex.m4])
AC_INIT([boxmox], [1.8], [christoph.knote@med.uni-augsburg.de])
dnl we use the build type foreign here instead of gnu because I do not have a NEWS file and similar, yet.
......@@ -8,8 +9,10 @@ AM_INIT_AUTOMAKE([-Wall foreign])
AC_PROG_CC
AC_PROG_LEX(noyywrap)
AC_PROG_YACC
AC_PROG_PDFLATEX
AC_CONFIG_FILES([
Makefile
src/Makefile
doc/Makefile
])
AC_OUTPUT
doc_DATA = boxmox_README.pdf
boxmox_README.pdf : boxmox_README.tex
@pdflatex@ $<
@pdflatex@ $<
rm -f *.log *.out *.toc *.aux
dist_doc_DATA = boxmox_README.tex boxmox_README.pdf
\ No newline at end of file
......@@ -343,7 +343,7 @@ values.
A typical \emph{BOXMOX.nml} file looks like this:
\begin{alltt}
\input{examples/BOXMOX.nml}
\input{../case_studies/BOXMOX.nml}
\end{alltt}
......
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program 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 2 of the License, or
(at your option) any later version.
This program 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
These macros for Autoconf test if latex and/or some others applications are installed
To use this macro, just do the following :
add m4_include([latex.m4]) to the configure.in file
use autoconf -I<path to folder of latex.m4>
or
aclocal -I <path to folder that contains these macro>
autoconf
Then, you can use the following macro :
AC_LATEX_CLASS_ARTICLE
-> set $article to yes if class article exists
AC_LATEX_CLASS_BOOK
-> set $book to yes if class book exists
AC_LATEX_CLASS_REPORT
-> set $report to yes if class report exists
AC_LATEX_CLASS(<class>,<var>)
or
AC_LATEX_CLASS(<class>,<var>,<action if yes>)
or
AC_LATEX_CLASS(<class>,<var>,<action if yes>,<action if no>)
-> set $<var> to yes if <class> exists
AC_LATEX_CLASSES ([<class1, class2, ...>],<var>)
-> set $<var> to the first class that exists
AC_LATEX_PACKAGE_AMSMATH
-> set $amsmath to the right way to include amsmath
AC_LATEX_PACKAGE_FONTENC
-> set $fontenc to OT1 or T1
AC_LATEX_PACKAGE_INPUT(<package>,<class>,<var>)
-> set $<var> to yes if <package> can be \input within <class>
AC_LATEX_PACKAGE_OPT(<package>,<class>,<var>,<opt>)
-> set $<var> to yes if <package> with <opt> works within <class>
AC_LATEX_PACKAGE(<package>,<class>,<var>)
or
AC_LATEX_PACKAGE(<package>,<class>,<var>,<action if yes>)
or
AC_LATEX_PACKAGE(<package>,<class>,<var>,<action if yes>,<action if no>)
-> set $<var> to yes if <package> can be use within <class>
AC_LATEX_PACKAGES([<package1>,<package2>,...],<class>,<var>)
-> set $<var> to the first package that works with <class>
AC_PROG_DVIPDF
-> test if dvipdf exists and set $dvipdf
AC_PROG_DVIPS
-> test if dvips exists and set $dvips
AC_PROG_FIG2DEV
-> test if fig2dev exists and set $fig2dev
AC_PROG_GNUPLOT
-> test if gnuplot exists and set $gnuplot
AC_PROG_GUNZIP
-> test if gunzip exists and set $gunzip
AC_PROG_GZIP
-> test if gzip exists and set $gzip
AC_PROG_LATEX
-> test if latex exists and set $latex
AC_PROG_MF
-> test if mf exists and set $mf
AC_PROG_PDFLATEX
-> test if pdflatex exists and set $pdflatex
AC_PROG_PS2PDF
-> test if ps2pdf exists and set $ps2pdf
AC_PROG_BIBTEX
-> test if bibtex exists and set $bibtex
AC_PROG_LATEX2HTML
-> test if latex2html exists and set $latex2html
AC_PROG_LATEX2MAN
-> test if latex2man exists and set $latex2man
AC_PROG_MAKEINDEX
-> test if makeindex exists and set $makeindex
AC_PROG_JPEG2PS
-> test if jpeg2ps exists and set $jpeg2ps
AC_LATEX_DVIPS_T (<paper>,<var>,[on|off])
-> test if option -t <paper> in dvips works and set var to yes or no. if last parameter is on, use -t landscape and -t <paper>
AC_LATEX_DVIPS_T_A4
-> test if option -t a4 in dvips works and set dvips_t_a4 to yes or no
AC_LATEX_DVIPS_T_LETTER
-> test if option -t letter in dvips works and set dvips_t_letter to yes or no
AC_LATEX_DVIPS_T_A4_LANDSCAPE
-> test if option -t a4 -t landscape in dvips works and set dvips_t_a4_landscape to yes or no
AC_LATEX_DVIPS_T_LETTER_LANDSCAPE
-> test if option -t letter -t landscape in dvips works and set dvips_t_letter_landscape to yes or no
AC_LATEX_DVIPS_O_STDOUT
-> test if option -t- in dvips works and set dvips_o_stdout to yes or no
AC_PROG_MKTEXPK
-> test if mktexpk exists and set $mktexpk
AC_PROG_TEXHASH
-> test if texhash exists and set $texhash
AC_PROG_KPSEWHICH
-> test if kpsewhich exists and set $kpsewhich
AC_TEXMF_PATH
-> test for a local texmf path where to install class and package
AC_PROG_PNGTOPNM
-> test if pngtopnm exists and set $pngtopnm
AC_PROG_PNMTOPS
-> test if pnmtops exists and set $pnmtops
AC_PROG_JPEGTOPNM
-> test if jpegtopnm exists and set $jpegtopnm
AC_PROG_LATEX2PNG
-> test if latex2png exists and set $latex2png
AC_PROG_LATEX2RTF
-> test if latex2rtf exists and set $latex2rtf
AC_PROG_PSBOOK
-> test if psbook exists and set $psbook
AC_PROG_PSNUP
-> test if psnup exists and set $psnup
AC_PROG_PSSELECT
-> test if psselect exists and set $psselect
AC_PROG_PSRESIZE
-> test if psresize exists and set $psresize
AC_PROG_DVIBOOK
-> test if dvibook exists and set $dvibook
History :
2004-08-14 : Version 1.3 of these macros
2004-07-24 : Changing .dvips folder to be destroy at end
2004-07-14 : Changing AC_LATEX_CLASS and AC_LATEX_PACKAGE to add feature
to support if and else operation
Adding AC_PROG_PNGTOPNM
Adding AC_PROG_PNMTOPS
Adding AC_PROG_JPEGTOPNM
Adding AC_PROG_LATEX2PNG
Adding AC_PROG_LATEX2RTF
Adding AC_PROG_PSBOOK
Adding AC_PROG_PSNUP
Adding AC_PROG_PSSELECT
Adding AC_PROG_PSRESIZE
Adding AC_PROG_DVIBOOK
2004-06-18 : Adding AC_PROG_TEXHASH
Adding AC_PROG_KPSEWHICH
Adding AC_TEXMF_PATH
2004-04-21 : Adding AC_LATEX_DVIPS_T_LETTER
Adding AC_LATEX_DVIPS_T_A4_LANDSCAPE
Adding AC_LATEX_DVIPS_T_LETTER_LANDSCAPE
Adding AC_LATEX_DVIPS_O_STDOUT
Adding AC_PROG_MKTEXPK
Bugs correction and adding some comments
2004-04-20 : Adding AC_PROG_BIBTEX
Adding AC_PROG_LATEX2HTML
Adding AC_PROG_LATEX2MAN
Adding AC_PROG_MAKEINDEX
Adding AC_PROG_JPEG2PS
Adding AC_LATEX_DVIPS_T
Adding AC_LATEX_DVIPS_T_A4
2004-04-19 : Version 1
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Internal macro to test a latex file
#
AC_DEFUN([_AC_LATEX_TEST],[
AC_REQUIRE([AC_PROG_LATEX])
rm -rf .tmps_latex
mkdir .tmps_latex
cd .tmps_latex
ifelse($#,2,[
$2="no"; export $2;
cat > testconf.tex << \EOF
$1
EOF
],$#,3,[
echo "\\documentclass{$3}" > testconf.tex
cat >> testconf.tex << \EOF
$1
EOF
],$#,4,[
echo "\\documentclass{$3}" > testconf.tex
echo "\\usepackage{$4}" > testconf.tex
cat >> testconf.tex << \EOF
$1
])
cat testconf.tex | $latex 2>&1 1>/dev/null && $2=yes; export $2;
cd ..
rm -rf .tmps_latex
])
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_CLASS(<class>,<variable>)
#
# Test the presences of class and set $<variable>
# to yes or no
#
#
dnl @synopsis AC_LATEX_CLASSE(<class1>,<var>)
dnl
dnl Test if class1 exists
dnl and set $var to the right value
dnl
dnl AC_LATEX_CLASSES([book],book)
dnl should set $book="yes"
dnl
dnl AC_LATEX_CLASSES(allo,book)
dnl should set $book="no"
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_CLASS],[
AC_CACHE_CHECK([for class $1],[ac_cv_latex_class_]translit($1,[-],[_]),[
_AC_LATEX_TEST([
\begin{document}
\end{document}
],[ac_cv_latex_class_]translit($1,[-],[_]),$1)
])
$2=$[ac_cv_latex_class_]translit($1,[-],[_]) ; export $2;
AC_SUBST($2)
ifelse($#,2,[],$#,3,[
if test "[$]$2" = "yes" ;
then
$3
fi
],$#,4,[
ifelse($3,[],[
if test "[$]$2" = "no" ;
then
$4
fi
],[
if test "[$]$2" = "yes" ;
then
$3
else
$4
fi
])
])
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_CLASS_ARTICLE
#
# Test the presences class article and
# set article to yes if exists,
# else Error
#
#
dnl @synopsis AC_LATEX_CLASS_ARTICLE
dnl
dnl same as AC_LATEX_CLASS(article,article)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_CLASS_ARTICLE],[
AC_LATEX_CLASS(article,article,[],[AC_MSG_ERROR([Unable to find the article class])])
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_CLASS_BOOK
#
# Test the presences class book and
# set book to yes if exists,
# else Error
#
#
dnl @synopsis AC_LATEX_CLASS_BOOK
dnl
dnl same as AC_LATEX_CLASS(book,book)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_CLASS_BOOK],[
AC_LATEX_CLASS(book,book,[],[AC_MSG_ERROR([Unable to find the book class])])
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_CLASS_REPORT
#
# Test the presences class report and
# set report to yes if exists,
# else Error
#
#
dnl @synopsis AC_LATEX_CLASS_REPORT
dnl
dnl same as AC_LATEX_CLASS(report,report)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_CLASS_REPORT],[
AC_LATEX_CLASS(report,report,[],[AC_MSG_ERROR([Unable to find the report class])])
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_CLASSES([<class1>,<class2>,...,<classn>],<variable>)
#
# Test the presences of class1 or class2 or ...
# and set $<variable> to the right value or no if not found
#
dnl @synopsis AC_LATEX_CLASSES([<class1>,<class2>,...],<var>)
dnl
dnl Test if class1 exists and if not class2 and so
dnl and set $var to the right value
dnl
dnl AC_LATEX_CLASSES([allo,book,bnjour],book)
dnl should set $book="book"
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
define(_AC_LATEX_CLASSES_INTERNE,[
ifelse($#,1,[],$#,2,[
AC_LATEX_CLASS($2,$1)
],[
AC_LATEX_CLASS($2,$1)
if test "$$1" = "yes";
then
$1=$2 ; export $1 ;
else
_AC_LATEX_CLASSES_INTERNE($1,m4_shift(m4_shift($@)))
fi;
])
])
AC_DEFUN([AC_LATEX_CLASSES],[
_AC_LATEX_CLASSES_INTERNE($2,$1)
AC_SUBST($2)
])
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_O_STDOUT
#
# Test dvips with option -o- and set $dvips_o_stdout to the right value
#
#
dnl @synopsis AC_LATEX_DVIPS_O_STDOUT
dnl
dnl test if dvips -o- works. If so, set $dvips_o_stdout to yes else to no
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_O_STDOUT],[
AC_REQUIRE([AC_LATEX_CLASS_BOOK])
AC_CACHE_CHECK([for option -o- in dvips],ac_cv_dvips_o_stdout,[
rm -rf .dvips
mkdir .dvips
cd .dvips
cat > test.tex << EOF
\documentclass{book}
\begin{document}
Test
\end{document}
EOF
$latex test.tex 1>/dev/null 2>&1
ac_cv_dvips_o_stdout="no"; export ac_cv_dvips_o_stdout;
$dvips -o- test.dvi 1>/dev/null 2>&1 && ac_cv_dvips_o_stdout="yes"; export ac_cv_dvips_o_stdout
cd ..
rm -rf .dvips
])
DVIPS_O_STDOUT=$ac_cv_dvips_o_stdout; export DVIPS_O_STDOUT;
if test $DVIPS_O_STDOUT = "no" ;
then
AC_MSG_ERROR(Unable to find the option -o- in dvips)
fi
AC_SUBST(DVIPS_O_STDOUT)
])
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_T(<paper>,<var>,[<on|off>])
#
# Test dvips with option -o ... -T <paper> et set $<var> to the right value
#
#
dnl @synopsis AC_LATEX_DVIPS_T(<paper>,<var>) or AC_LATEX_DVIPS_T(<paper>,<var>,on|off)
dnl
dnl This macro test if dvips -o ... -t <paper> works. When using the on option, test
dnl if dvips -o ... -t <paper> -t landscape works.
dnl if it works, set $var to yes, else $var="no"
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_T],[
AC_REQUIRE([AC_LATEX_CLASS_BOOK])
if test "$3" = "on" ;
then
_ac_latex_dvips_local=" -t landscape" ; export _ac_latex_dvips_local ;
else
_ac_latex_dvips_local=" " ; export _ac_latex_dvips_local ;
fi
AC_CACHE_CHECK([for option -t $1 $_ac_latex_dvips_local with dvips],[ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_]),[
rm -rf .dvips
mkdir .dvips
cd .dvips
cat > test.tex << EOF
\documentclass{book}
\begin{document}
Test
\end{document}
EOF
$latex test.tex 1>/dev/null 2>&1
[ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_])="yes"; export [ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_]);
$dvips -o test.ps test.dvi -t $1 $_ac_latex_dvips_local 2>&1 1>/dev/null | (grep "dvips: no match for papersize" 1>/dev/null 2>&1 && [ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_])="no"; export [ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_]))
cd ..
rm -rf .dvips
])
$2=$[ac_cv_dvips_t_]translit($1,[-],[_])[_]translit($3,[-],[_]); export $2;
AC_SUBST($2)
])
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_T_A4
#
# Test dvips -t a4 and set dvips_t_a4
#
#
dnl @synopsis AC_LATEX_DVIPS_T_A4
dnl
dnl same as AC_LATEX_DVIPS_T(a4,dvips_t_a4)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_T_A4],[
AC_LATEX_DVIPS_T(a4,dvips_t_a4)
if test $dvips_t_a4 = "no";
then
AC_MSG_ERROR([Unable to find the -t a4 option in dvips])
fi
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_T_A4_LANDSCAPE
#
# Test dvips -t a4 -t landscape and set dvips_t_a4_landscape
#
#
dnl @synopsis AC_LATEX_DVIPS_T_A4_LANDSCAPE
dnl
dnl same as AC_LATEX_DVIPS_T(a4,dvips_t_a4_landscape,on)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_T_A4_LANDSCAPE],[
AC_REQUIRE([AC_LATEX_DVIPS_T_A4])
AC_LATEX_DVIPS_T(a4,dvips_t_a4_landscape,on)
if test $dvips_t_a4_landscape = "no";
then
AC_MSG_ERROR([Unable to find the -t a4 -t landscape option in dvips])
fi
])
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_T_LETTER
#
# Test dvips -t letter and set dvips_t_letter
#
#
dnl @synopsis AC_LATEX_DVIPS_T_LETTER
dnl
dnl same as AC_LATEX_DVIPS_T(letter,dvips_t_letter)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_T_LETTER],[
AC_LATEX_DVIPS_T(letter,dvips_t_letter)
if test $dvips_t_letter = "no";
then
AC_MSG_ERROR([Unable to find the -t letter option in dvips])
fi
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_DVIPS_T_LETTER_LANDSCAPE
#
# Test dvips -t letter -t landscape and set dvips_t_letter_landscape
#
#
dnl @synopsis AC_LATEX_DVIPS_T_LETTER_LANDSCAPE
dnl
dnl same as AC_LATEX_DVIPS_T(letter,dvips_t_letter_landscape,on)
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_DVIPS_T_LETTER_LANDSCAPE],[
AC_REQUIRE([AC_LATEX_DVIPS_T_LETTER])
AC_LATEX_DVIPS_T(letter,dvips_t_letter_landscape,on)
if test $dvips_t_letter_landscape = "no";
then
AC_MSG_ERROR([Unable to find the -t letter -t landscape option in dvips])
fi
])
\ No newline at end of file
#
# Copyright (C) 2004 Boretti Mathieu
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# AC_LATEX_PACKAGE([<packagen>],<class>,<variable>)
#
# Test the presences of package and set $<variable>
# to yes or no
#
#
dnl @synopsis AC_LATEX_PACKAGE(<package>,<class>,<variable>)
dnl
dnl This macro test if package in <class> exists
dnl and set <variable> to the right value
dnl
dnl AC_LATEX_PACKAGE(varioref,book,vbook)
dnl should set $vbook="yes"
dnl
dnl AC_LATEX_PACKAGE(xyz,book,vbook)
dnl should set $vbook="no"
dnl
dnl @version 1.3
dnl @author Mathieu Boretti boretti@eig.unige.ch
dnl
AC_DEFUN([AC_LATEX_PACKAGE],[
if test "$[ac_cv_latex_class_]translit($2,[-],[_])" = "" ;
then
AC_LATEX_CLASS($2,boretti_classesansparametre)
export boretti_classesansparametre;
else
boretti_classesansparametre=$[ac_cv_latex_class_]translit($2,[-],[_]) ;
export boretti_classesansparemetre;
fi;
if test $boretti_classesansparametre = "no" ;
then
AC_MSG_ERROR([Unable to find $2 class])
fi
AC_CACHE_CHECK([for $1 in class $2],[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_]),[
_AC_LATEX_TEST([
\documentclass{$2}
\usepackage{$1}
\begin{document}
\end{document}
],[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_]))
])
$3=$[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_]); export $3;
AC_SUBST($3)
ifelse($#,3,[],$#,4,[
if test "[$]$3" = "yes" ;
then
$4
fi
],$#,5,[
ifelse($4,[],[
if test "[$]$3" = "no" ;
then
$5
fi
],[
if test "[$]$3" = "yes" ;
then
$4
else
$5
fi
])
])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment