diff options
Diffstat (limited to 'support/autoconf')
51 files changed, 2772 insertions, 0 deletions
diff --git a/support/autoconf/.DS_Store b/support/autoconf/.DS_Store Binary files differnew file mode 100644 index 0000000000..5008ddfcf5 --- /dev/null +++ b/support/autoconf/.DS_Store diff --git a/support/autoconf/LICENSE b/support/autoconf/LICENSE new file mode 100644 index 0000000000..5b6e7c66c2 --- /dev/null +++ b/support/autoconf/LICENSE @@ -0,0 +1,340 @@ + 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. diff --git a/support/autoconf/README b/support/autoconf/README new file mode 100644 index 0000000000..03821a60a0 --- /dev/null +++ b/support/autoconf/README @@ -0,0 +1,192 @@ +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 diff --git a/support/autoconf/_ac_latex_test.m4 b/support/autoconf/_ac_latex_test.m4 new file mode 100644 index 0000000000..ceee723473 --- /dev/null +++ b/support/autoconf/_ac_latex_test.m4 @@ -0,0 +1,46 @@ +# +# 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 +]) diff --git a/support/autoconf/ac_latex_class.m4 b/support/autoconf/ac_latex_class.m4 new file mode 100644 index 0000000000..61c571a6c4 --- /dev/null +++ b/support/autoconf/ac_latex_class.m4 @@ -0,0 +1,69 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_class_article.m4 b/support/autoconf/ac_latex_class_article.m4 new file mode 100644 index 0000000000..681c1e06f7 --- /dev/null +++ b/support/autoconf/ac_latex_class_article.m4 @@ -0,0 +1,35 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_class_book.m4 b/support/autoconf/ac_latex_class_book.m4 new file mode 100644 index 0000000000..792049470a --- /dev/null +++ b/support/autoconf/ac_latex_class_book.m4 @@ -0,0 +1,35 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_class_report.m4 b/support/autoconf/ac_latex_class_report.m4 new file mode 100644 index 0000000000..982ab1138b --- /dev/null +++ b/support/autoconf/ac_latex_class_report.m4 @@ -0,0 +1,35 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_classes.m4 b/support/autoconf/ac_latex_classes.m4 new file mode 100644 index 0000000000..975c566a0c --- /dev/null +++ b/support/autoconf/ac_latex_classes.m4 @@ -0,0 +1,52 @@ +# +# 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) +]) diff --git a/support/autoconf/ac_latex_dvips_o_stdout.m4 b/support/autoconf/ac_latex_dvips_o_stdout.m4 new file mode 100644 index 0000000000..fa620d9e66 --- /dev/null +++ b/support/autoconf/ac_latex_dvips_o_stdout.m4 @@ -0,0 +1,55 @@ +# +# 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) +]) diff --git a/support/autoconf/ac_latex_dvips_t.m4 b/support/autoconf/ac_latex_dvips_t.m4 new file mode 100644 index 0000000000..dcc3f035d0 --- /dev/null +++ b/support/autoconf/ac_latex_dvips_t.m4 @@ -0,0 +1,59 @@ +# +# 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) +]) diff --git a/support/autoconf/ac_latex_dvips_t_a4.m4 b/support/autoconf/ac_latex_dvips_t_a4.m4 new file mode 100644 index 0000000000..36321ef482 --- /dev/null +++ b/support/autoconf/ac_latex_dvips_t_a4.m4 @@ -0,0 +1,37 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_dvips_t_a4_landscape.m4 b/support/autoconf/ac_latex_dvips_t_a4_landscape.m4 new file mode 100644 index 0000000000..04073538fc --- /dev/null +++ b/support/autoconf/ac_latex_dvips_t_a4_landscape.m4 @@ -0,0 +1,38 @@ +# +# 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 +]) diff --git a/support/autoconf/ac_latex_dvips_t_letter.m4 b/support/autoconf/ac_latex_dvips_t_letter.m4 new file mode 100644 index 0000000000..17f4ad6326 --- /dev/null +++ b/support/autoconf/ac_latex_dvips_t_letter.m4 @@ -0,0 +1,38 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_dvips_t_letter_landscape.m4 b/support/autoconf/ac_latex_dvips_t_letter_landscape.m4 new file mode 100644 index 0000000000..4f127c2753 --- /dev/null +++ b/support/autoconf/ac_latex_dvips_t_letter_landscape.m4 @@ -0,0 +1,38 @@ +# +# 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 diff --git a/support/autoconf/ac_latex_package.m4 b/support/autoconf/ac_latex_package.m4 new file mode 100644 index 0000000000..c303608204 --- /dev/null +++ b/support/autoconf/ac_latex_package.m4 @@ -0,0 +1,83 @@ +# +# 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 + ]) +]) +]) diff --git a/support/autoconf/ac_latex_package_amsmath.m4 b/support/autoconf/ac_latex_package_amsmath.m4 new file mode 100644 index 0000000000..da8c3928ba --- /dev/null +++ b/support/autoconf/ac_latex_package_amsmath.m4 @@ -0,0 +1,66 @@ +# +# 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_AMSMATH +# +# Test the presences of amsmath and amsfonts and in case of error +# amstex and set $amsmath to the right values +# +# Use the book class to do the test +# +# +dnl @synopsis AC_LATEX_PACKAGE_AMSMATH +dnl +dnl This macro test if \usepackage{amsmath,amsfonts} works. If yes, it set +dnl $amsmath="\usepackage{amsmath,amsfonts}" +dnl Else if \usepackage{amstex} works, set $amsmath="\usepackage{amstex}" +dnl else ERROR +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_LATEX_PACKAGE_AMSMATH],[ +AC_LATEX_CLASS_BOOK +AC_CACHE_CHECK([for amsmath],[ac_cv_latex_package_f_amsmath],[ +_AC_LATEX_TEST([ +\documentclass{book} +\usepackage{amsmath,amsfonts} +\begin{document} +\end{document} +],[ac_cv_latex_package_f_amsmath]) +if test $ac_cv_latex_package_f_amsmath = "yes" ; +then + [ac_cv_latex_package_f_amsmath]="\\usepackage{amsmath,amsfonts}" ; export [ac_cv_latex_package_f_amsmath] ; +else + _AC_LATEX_TEST([ + \documentclass{book} + \usepackage{amstex} + \begin{document} + \end{document} + ],[ac_cv_latex_package_f_amsmath]) + if test $ac_cv_latex_package_f_amsmath = "yes" ; + then + [ac_cv_latex_package_f_amsmath]="\\usepackage{amstex}" ; export [ac_cv_latex_package_f_amsmath] ; + else + AC_MSG_ERROR([Unable to find amsmath]) + fi +fi +]) +amsmath=$[ac_cv_latex_package_f_amsmath]; export amsmath; +AC_SUBST(amsmath) +]) diff --git a/support/autoconf/ac_latex_package_fontenc.m4 b/support/autoconf/ac_latex_package_fontenc.m4 new file mode 100644 index 0000000000..8f4c3745a6 --- /dev/null +++ b/support/autoconf/ac_latex_package_fontenc.m4 @@ -0,0 +1,74 @@ +# +# 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_FONTENC +# +# Test if \usepackage[T1]{fontenc} +# if yes -> $fontenc = T1 +# else +# Test if \usepckage[OT1]{fontenc} +# if yes -> $fontenc = OT1 +# else +# Error +# +# Use the book class for the test +# +# +dnl @synopsis AC_LATEX_PACKAGE_FONTENC +dnl +dnl This macro test if \usepackage[T1]{fontenc} works. If yes +dnl it set $fontenc="T1" +dnl else if \usepackage[OT1]{fontenc} works, set $fontenc="OT1" +dnl else ERROR +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +define(_AC_LATEX_PACKAGE_FONTENC_INTERNE,[ +changequote(*, !)dnl +\documentclass{book} +\usepackage[$1]{fontenc} +\begin{document} +\end{document} +changequote([, ])dnl + +]) + +AC_DEFUN([AC_LATEX_PACKAGE_FONTENC],[ + AC_LATEX_CLASS_BOOK + AC_CACHE_CHECK([for fontenc],[ac_cv_latex_package_fontenc_opt],[ + _AC_LATEX_TEST([_AC_LATEX_PACKAGE_FONTENC_INTERNE(T1)],[ac_cv_latex_package_fontenc_opt]) + if test $ac_cv_latex_package_fontenc_opt = "yes" ; + then + ac_cv_latex_package_fontenc_opt="T1"; export ac_cv_latex_package_fontenc_opt; + else + _AC_LATEX_TEST([_AC_LATEX_PACKAGE_FONTENC_INTERNE(OT1)],[ac_cv_latex_package_fontenc_opt]) + if test $ac_cv_latex_package_fontenc_opt = "yes" ; + then + ac_cv_latex_package_fontenc_opt="OT1"; export ac_cv_latex_package_fontenc_opt; + fi + fi + + ]) + if test $ac_cv_latex_package_fontenc_opt = "no" ; + then + AC_MSG_ERROR([Unable to use fontenc with T1 nor OT1]) + fi + fontenc=$ac_cv_latex_package_fontenc_opt ; export fontenc ; + AC_SUBST(fontenc) +])
\ No newline at end of file diff --git a/support/autoconf/ac_latex_package_input.m4 b/support/autoconf/ac_latex_package_input.m4 new file mode 100644 index 0000000000..fd12034782 --- /dev/null +++ b/support/autoconf/ac_latex_package_input.m4 @@ -0,0 +1,58 @@ +# +# 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_INPUT(<packagen>],<class>,<variable>) +# +# Test the presences of package using class <class> and +# using \input instance of \usepackage and set $<variable> +# to yes or no +# +# +dnl @synopsis AC_LATEX_INPUT(<package>,<class>,<variable>) +dnl +dnl This macro test if package in <class> exists +dnl and set <variable> to the right value (yes or no) +dnl Use \input instance of \usepackage +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_LATEX_PACKAGE_INPUT],[ +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, using input insteance of usepackage],[ac_cv_latex_i_]translit($1,[-.],[__])[_]translit($2,[-],[_]),[ +_AC_LATEX_TEST([ +\documentclass{$2} +\input $1 +\begin{document} +\end{document} +],[ac_cv_latex_i_]translit($1,[-.],[__])[_]translit($2,[-],[_])) +]) +$3=$[ac_cv_latex_i_]translit($1,[-.],[__])[_]translit($2,[-],[_]); export $3; +AC_SUBST($3) +]) diff --git a/support/autoconf/ac_latex_package_opt.m4 b/support/autoconf/ac_latex_package_opt.m4 new file mode 100644 index 0000000000..56f71007d6 --- /dev/null +++ b/support/autoconf/ac_latex_package_opt.m4 @@ -0,0 +1,64 @@ +# +# 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_OPT(<packagen>,<class>,<variable>,<option>) +# +# Test the presences of package using class <class> +# and option <option> and set $<variable> to yes or no +# +# +dnl @synopsis AC_LATEX_PACKAGE_OPT(<package>,<class>,<variable>,<option>) +dnl +dnl This macro test if package in <class> with option <option> exists +dnl and set <variable> to the right value (yes or no) +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl + +define(_AC_LATEX_PACKAGE_OPT_INTERNE,[ +changequote(*, !)dnl +\documentclass{$2} +\usepackage[$3]{$1} +\begin{document} +\end{document} +changequote([, ])dnl + +]) + +AC_DEFUN([AC_LATEX_PACKAGE_OPT],[ +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 $1 class]) +fi +AC_CACHE_CHECK([for $1 in class $2 with $4 as option],[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_])[_]translit($4,[-],[_]),[ +_AC_LATEX_TEST([ +_AC_LATEX_PACKAGE_OPT_INTERNE($1,$2,$4) +],[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_])[_]translit($4,[-],[_])) +]) +$3=$[ac_cv_latex_]translit($1,[-],[_])[_]translit($2,[-],[_])[_]translit($4,[-],[_]); export $3; +AC_SUBST($3) +]) diff --git a/support/autoconf/ac_latex_packages.m4 b/support/autoconf/ac_latex_packages.m4 new file mode 100644 index 0000000000..4cead4e50a --- /dev/null +++ b/support/autoconf/ac_latex_packages.m4 @@ -0,0 +1,54 @@ +# +# 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_PACKAGES([<package1>,<package2>,...,<packagen>],<class>,<variable>) +# +# Test the presences of package1 or if not package2 and so +# Using class <class> and set $<variable> to the right value +# or no if not found +# +# +dnl @synopsis AC_LATEX_PACKAGES([<package1>,<package2>,<package3>],<class>,<variable>) +dnl +dnl This macro test if package1 in <class> exists and if not package2 and so +dnl and set <variable> to the right value +dnl +dnl AC_LATEX_PACKAGES([allo,varioref,bonjour],book,vbook) +dnl should set $vbook="varioref" +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +define(_AC_LATEX_PACKAGE_INTERNE,[ + ifelse($#,0,[],$#,1,[],$#,2,[],$#,3,[ + AC_LATEX_PACKAGE($3,$2,$1) + ],[ + AC_LATEX_PACKAGE($3,$2,$1) + if test "$$1" = "yes"; + then + $1=$3 ; export $1 ; + else + _AC_LATEX_PACKAGE_INTERNE($1,$2,m4_shift(m4_shift(m4_shift($@)))) + fi; + ]) +]) + +AC_DEFUN(AC_LATEX_PACKAGES,[ + _AC_LATEX_PACKAGE_INTERNE($3,$2,$1) + AC_SUBST($3) +])
\ No newline at end of file diff --git a/support/autoconf/ac_prog_bibtex.m4 b/support/autoconf/ac_prog_bibtex.m4 new file mode 100644 index 0000000000..3fd5065d20 --- /dev/null +++ b/support/autoconf/ac_prog_bibtex.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_BIBTEX +# +# Test for bibtex +# and set $bibtex to the correct value. +# +# +dnl @synopsis AC_PROG_BIBTEX +dnl +dnl This macro test if bibtex is installed. If bibtex +dnl is installed, it set $bibtex to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_BIBTEX],[ +AC_CHECK_PROGS(bibtex,bibtex,no) +export bibtex; +if test $bibtex = "no" ; +then + AC_MSG_ERROR([Unable to find a BiTex application]); +fi +AC_SUBST(bibtex) +]) diff --git a/support/autoconf/ac_prog_dvibook.m4 b/support/autoconf/ac_prog_dvibook.m4 new file mode 100644 index 0000000000..d77b6c72ab --- /dev/null +++ b/support/autoconf/ac_prog_dvibook.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_DVIBOOK +# +# Test for dvibook +# and set $dvibook to the correct value. +# +# +dnl @synopsis AC_PROG_DVIBOOK +dnl +dnl This macro test if dvibook is installed. If dvibook +dnl is installed, it set $dvibook to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_DVIBOOK],[ +AC_CHECK_PROGS(dvibook,dvibook,no) +export dvibook; +if test $dvibook = "no" ; +then + AC_MSG_ERROR([Unable to find a dvibook application]); +fi; +AC_SUBST(dvibook) +]) diff --git a/support/autoconf/ac_prog_dvipdf.m4 b/support/autoconf/ac_prog_dvipdf.m4 new file mode 100644 index 0000000000..ffbf9e4c0f --- /dev/null +++ b/support/autoconf/ac_prog_dvipdf.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_DVIPS +# +# Test for dvipdf +# and set $dvipdf to the correct value. +# +# +dnl @synopsis AC_PROG_DVIPDF +dnl +dnl This macro test if dvipdf is installed. If dvipdf +dnl is installed, it set $dvipdf to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_DVIPDF],[ +AC_CHECK_PROGS(dvipdf,dvipdf,no) +export dvipdf; +if test $dvipdf = "no" ; +then + AC_MSG_ERROR([Unable to find a dvipdf application]); +fi; +AC_SUBST(dvipdf) +])
\ No newline at end of file diff --git a/support/autoconf/ac_prog_dvips.m4 b/support/autoconf/ac_prog_dvips.m4 new file mode 100644 index 0000000000..309f3dfc37 --- /dev/null +++ b/support/autoconf/ac_prog_dvips.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_DVIPS +# +# Test for dvips +# and set $dvips to the correct value. +# +# +dnl @synopsis AC_PROG_DVIPS +dnl +dnl This macro test if dvips is installed. If dvips +dnl is installed, it set $dvips to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_DVIPS],[ +AC_CHECK_PROGS(dvips,dvips,no) +export dvips; +if test $dvips = "no" ; +then + AC_MSG_ERROR([Unable to find a dvips application]); +fi; +AC_SUBST(dvips) +]) diff --git a/support/autoconf/ac_prog_fig2dev.m4 b/support/autoconf/ac_prog_fig2dev.m4 new file mode 100644 index 0000000000..55ae5ff159 --- /dev/null +++ b/support/autoconf/ac_prog_fig2dev.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_FIG2DEV +# +# Test for fig2dev +# and set $fig2dev to the correct value. +# +# +dnl @synopsis AC_PROG_FIG2DEV +dnl +dnl This macro test if fig2dev is installed. If fig2dev +dnl is installed, it set $fig2dev to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_FIG2DEV],[ +AC_CHECK_PROGS(fig2dev,[fig2dev],no) +export fig2dev; +if test $fig2dev = "no" ; +then + AC_MSG_ERROR([Unable to find a fig2dev application]); +fi +AC_SUBST(fig2dev) +])
\ No newline at end of file diff --git a/support/autoconf/ac_prog_gnuplot.m4 b/support/autoconf/ac_prog_gnuplot.m4 new file mode 100644 index 0000000000..3857b872d5 --- /dev/null +++ b/support/autoconf/ac_prog_gnuplot.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_GNUPLOT +# +# Test for gnuplot +# and set $gnuplot to the correct value. +# +# +dnl @synopsis AC_PROG_GNUPLOT +dnl +dnl This macro test if gnuplot is installed. If gnuplot +dnl is installed, it set $gnuplot to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_GNUPLOT],[ +AC_CHECK_PROGS(gnuplot,[gnuplot],no) +export gnuplot; +if test $gnuplot = "no" ; +then + AC_MSG_ERROR([Unable to find a gnuplot application]); +fi +AC_SUBST(gnuplot) +]) diff --git a/support/autoconf/ac_prog_gunzip.m4 b/support/autoconf/ac_prog_gunzip.m4 new file mode 100644 index 0000000000..3f39333edc --- /dev/null +++ b/support/autoconf/ac_prog_gunzip.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_GUNZIP +# +# Test for gunzip +# and set $gunzip to the correct value. +# +# +dnl @synopsis AC_PROG_GUNZIP +dnl +dnl This macro test if gunzip is installed. If gunzip +dnl is installed, it set $gunzip to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_GUNZIP],[ +AC_CHECK_PROGS(gunzip,[gunzip],no) +export gunzip; +if test $gunzip = "no" ; +then + AC_MSG_ERROR([Unable to find the gunzip application]); +fi +AC_SUBST(gunzip) +]) diff --git a/support/autoconf/ac_prog_gzip.m4 b/support/autoconf/ac_prog_gzip.m4 new file mode 100644 index 0000000000..13b1211c9e --- /dev/null +++ b/support/autoconf/ac_prog_gzip.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_GZIP +# +# Test for gzip +# and set $gzip to the correct value. +# +# +dnl @synopsis AC_PROG_GZIP +dnl +dnl This macro test if gzip is installed. If gzip +dnl is installed, it set $gzip to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_GZIP],[ +AC_CHECK_PROGS(gzip,[gzip],no) +export gzip; +if test $gzip = "no" ; +then + AC_MSG_ERROR([Unable to find the gzip application]); +fi +AC_SUBST(gzip) +]) diff --git a/support/autoconf/ac_prog_jpeg2ps.m4 b/support/autoconf/ac_prog_jpeg2ps.m4 new file mode 100644 index 0000000000..0d841f134c --- /dev/null +++ b/support/autoconf/ac_prog_jpeg2ps.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_JPEG2PS +# +# Test for jpeg2ps +# and set $jpeg2ps to the correct value. +# +# +dnl @synopsis AC_PROG_JPEG2PS +dnl +dnl This macro test if jpeg2ps is installed. If jpeg2ps +dnl is installed, it set $jpeg2ps to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_JPEG2PS],[ +AC_CHECK_PROGS(jpeg2ps,[jpeg2ps],no) +export jpeg2ps; +if test $jpeg2ps = "no" ; +then + AC_MSG_ERROR([Unable to find a jpeg2ps application]); +fi +AC_SUBST(jpeg2ps) +]) diff --git a/support/autoconf/ac_prog_jpegtopnm.m4 b/support/autoconf/ac_prog_jpegtopnm.m4 new file mode 100644 index 0000000000..f96225f0a5 --- /dev/null +++ b/support/autoconf/ac_prog_jpegtopnm.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_JPEGTOPNM +# +# Test for jpegtopnm +# and set $jpegtopnm to the correct value. +# +# +dnl @synopsis AC_PROG_JPEGTOPNM +dnl +dnl This macro test if jpegtopnm is installed. If jpegtopnm +dnl is installed, it set $jpegtopnm to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_JPEGTOPNM],[ +AC_CHECK_PROGS(jpegtopnm,[jpegtopnm],no) +export jpegtopnm; +if test $jpegtopnm = "no" ; +then + AC_MSG_ERROR([Unable to find a jpegtopnm application]); +fi +AC_SUBST(jpegtopnm) +]) diff --git a/support/autoconf/ac_prog_kpsewhich.m4 b/support/autoconf/ac_prog_kpsewhich.m4 new file mode 100644 index 0000000000..b2c2bdce49 --- /dev/null +++ b/support/autoconf/ac_prog_kpsewhich.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_KPSEWHICH +# +# Test for kpsewhich +# and set $kpsewhich to the correct value. +# +# +dnl @synopsis AC_PROG_KPSEWHICH +dnl +dnl This macro test if kpsewhich is installed. If kpsewhich +dnl is installed, it set $kpsewhich to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_KPSEWHICH],[ +AC_CHECK_PROGS(kpsewhich,[kpsewhich],no) +export kpsewhich; +if test $kpsewhich = "no" ; +then + AC_MSG_ERROR([Unable to find the kpsewhich application]); +fi +AC_SUBST(kpsewhich) +]) diff --git a/support/autoconf/ac_prog_latex.m4 b/support/autoconf/ac_prog_latex.m4 new file mode 100644 index 0000000000..7204471da1 --- /dev/null +++ b/support/autoconf/ac_prog_latex.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_LATEX +# +# Test for latex or elatax or lambda +# and set $latex to the correct value. +# +# +dnl @synopsis AC_PROG_LATEX +dnl +dnl This macro test if latex is installed. If latex +dnl is installed, it set $latex to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_LATEX],[ +AC_CHECK_PROGS(latex,[latex elatex lambda],no) +export latex; +if test $latex = "no" ; +then + AC_MSG_ERROR([Unable to find a LaTeX application]); +fi +AC_SUBST(latex) +]) diff --git a/support/autoconf/ac_prog_latex2html.m4 b/support/autoconf/ac_prog_latex2html.m4 new file mode 100644 index 0000000000..3b96fc4fb9 --- /dev/null +++ b/support/autoconf/ac_prog_latex2html.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_LATEX2HTML +# +# Test for latex2html +# and set $latex2html to the correct value. +# +# +dnl @synopsis AC_PROG_LATEX2HTML +dnl +dnl This macro test if latex2html is installed. If latex2html +dnl is installed, it set $latex2html to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_LATEX2HTML],[ +AC_CHECK_PROGS(latex2html,[latex2html],no) +export latex2html; +if test $latex2html = "no" ; +then + AC_MSG_ERROR([Unable to find a LaTeX2html application]); +fi +AC_SUBST(latex2html) +]) diff --git a/support/autoconf/ac_prog_latex2man.m4 b/support/autoconf/ac_prog_latex2man.m4 new file mode 100644 index 0000000000..2c55c065f7 --- /dev/null +++ b/support/autoconf/ac_prog_latex2man.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_LATEX2MAN +# +# Test for latex2man +# and set $latex2man to the correct value. +# +# +dnl @synopsis AC_PROG_LATEX2MAN +dnl +dnl This macro test if latex2man is installed. If latex2man +dnl is installed, it set $latex2man to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_LATEX2MAN],[ +AC_CHECK_PROGS(latex2man,[latex2man],no) +export latex2man; +if test $latex2man = "no" ; +then + AC_MSG_ERROR([Unable to find a LaTeX2man application]); +fi +AC_SUBST(latex2man) +]) diff --git a/support/autoconf/ac_prog_latex2png.m4 b/support/autoconf/ac_prog_latex2png.m4 new file mode 100644 index 0000000000..522f4a71a4 --- /dev/null +++ b/support/autoconf/ac_prog_latex2png.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_LATEX2PNG +# +# Test for latex2png +# and set $latex2png to the correct value. +# +# +dnl @synopsis AC_PROG_LATEX2PNG +dnl +dnl This macro test if latex2png is installed. If latex2png +dnl is installed, it set $latex2png to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_LATEX2PNG],[ +AC_CHECK_PROGS(latex2png,[latex2png],no) +export latex2png; +if test $latex2png = "no" ; +then + AC_MSG_ERROR([Unable to find a LaTeX2png application]); +fi +AC_SUBST(latex2png) +]) diff --git a/support/autoconf/ac_prog_latex2rtf.m4 b/support/autoconf/ac_prog_latex2rtf.m4 new file mode 100644 index 0000000000..cfd7530e6a --- /dev/null +++ b/support/autoconf/ac_prog_latex2rtf.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_LATEX2RTF +# +# Test for latex2rtf +# and set $latex2rtf to the correct value. +# +# +dnl @synopsis AC_PROG_LATEX2RTF +dnl +dnl This macro test if latex2rtf is installed. If latex2rtf +dnl is installed, it set $latex2rtf to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_LATEX2RTF],[ +AC_CHECK_PROGS(latex2rtf,[latex2rtf],no) +export latex2rtf; +if test $latex2rtf = "no" ; +then + AC_MSG_ERROR([Unable to find a LaTeX2rtf application]); +fi +AC_SUBST(latex2rtf) +]) diff --git a/support/autoconf/ac_prog_makeindex.m4 b/support/autoconf/ac_prog_makeindex.m4 new file mode 100644 index 0000000000..90d884a66d --- /dev/null +++ b/support/autoconf/ac_prog_makeindex.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_MAKEINDEX +# +# Test for makeindex +# and set $makeindex to the correct value. +# +# +dnl @synopsis AC_PROG_MAKEINDEX +dnl +dnl This macro test if makeindex is installed. If makeindex +dnl is installed, it set $makeindex to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_MAKEINDEX],[ +AC_CHECK_PROGS(makeindex,makeindex,no) +export makeindex; +if test $makeindex = "no" ; +then + AC_MSG_ERROR([Unable to find a MakeIndex application]); +fi +AC_SUBST(makeindex) +]) diff --git a/support/autoconf/ac_prog_mf.m4 b/support/autoconf/ac_prog_mf.m4 new file mode 100644 index 0000000000..ca5cd932f1 --- /dev/null +++ b/support/autoconf/ac_prog_mf.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_MF +# +# Test for mf or mfw or mf-nowin +# and set $mf to the correct value. +# +# +dnl @synopsis AC_PROG_MF +dnl +dnl This macro test if mf is installed. If mf +dnl is installed, it set $mf to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_MF],[ +AC_CHECK_PROGS(mf,[mf mfw mf-nowin],no) +export mf; +if test $mf = "no" ; +then + AC_MSG_ERROR([Unable to find a mf application]); +fi +AC_SUBST(mf) +]) diff --git a/support/autoconf/ac_prog_mktexpk.m4 b/support/autoconf/ac_prog_mktexpk.m4 new file mode 100644 index 0000000000..42904f5a93 --- /dev/null +++ b/support/autoconf/ac_prog_mktexpk.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_MKTEXPK +# +# Test for mktexpk +# and set $mktexpk to the correct value. +# +# +dnl @synopsis AC_PROG_MKTEXPK +dnl +dnl This macro test if mktexpk is installed. If mktexpk +dnl is installed, it set $mktexpk to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_MKTEXPK],[ +AC_CHECK_PROGS(mktexpk,mktexpk,no) +export mktexpk; +if test $mktexpk = "no" ; +then + AC_MSG_ERROR([Unable to find a mktexpk application]); +fi; +AC_SUBST(mktexpk) +]) diff --git a/support/autoconf/ac_prog_pdflatex.m4 b/support/autoconf/ac_prog_pdflatex.m4 new file mode 100644 index 0000000000..2b839a14a8 --- /dev/null +++ b/support/autoconf/ac_prog_pdflatex.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PDFLATEX +# +# Test for pdflatex +# and set $pdflatex to the correct value. +# +# +dnl @synopsis AC_PROG_PDFLATEX +dnl +dnl This macro test if pdflatex is installed. If pdflatex +dnl is installed, it set $pdflatex to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PDFLATEX],[ +AC_CHECK_PROGS(pdflatex,[pdflatex],no) +export pdflatex; +if test $pdflatex = "no" ; +then + AC_MSG_ERROR([Unable to find a PDFLaTeX application]); +fi +AC_SUBST(pdflatex) +]) diff --git a/support/autoconf/ac_prog_pngtopnm.m4 b/support/autoconf/ac_prog_pngtopnm.m4 new file mode 100644 index 0000000000..dfb95b3824 --- /dev/null +++ b/support/autoconf/ac_prog_pngtopnm.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PNGTOPNM +# +# Test for pngtopnm +# and set $pngtopnm to the correct value. +# +# +dnl @synopsis AC_PROG_PNGTOPNM +dnl +dnl This macro test if pngtopnm is installed. If pngtopnm +dnl is installed, it set $pngtopnm to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PNGTOPNM],[ +AC_CHECK_PROGS(pngtopnm,[pngtopnm],no) +export pngtopnm; +if test $pngtopnm = "no" ; +then + AC_MSG_ERROR([Unable to find a pngtopnm application]); +fi +AC_SUBST(pngtopnm) +]) diff --git a/support/autoconf/ac_prog_pnmtops.m4 b/support/autoconf/ac_prog_pnmtops.m4 new file mode 100644 index 0000000000..da7cffd19b --- /dev/null +++ b/support/autoconf/ac_prog_pnmtops.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PNMTOPS +# +# Test for pnmtops +# and set $pnmtops to the correct value. +# +# +dnl @synopsis AC_PROG_PNMTOPS +dnl +dnl This macro test if pnmtops is installed. If pnmtops +dnl is installed, it set $pnmtops to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PNMTOPS],[ +AC_CHECK_PROGS(pnmtops,[pnmtops],no) +export pnmtops; +if test $pnmtops = "no" ; +then + AC_MSG_ERROR([Unable to find a pnmtops application]); +fi +AC_SUBST(pnmtops) +]) diff --git a/support/autoconf/ac_prog_ps2pdf.m4 b/support/autoconf/ac_prog_ps2pdf.m4 new file mode 100644 index 0000000000..975d5940df --- /dev/null +++ b/support/autoconf/ac_prog_ps2pdf.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PS2PDF +# +# Test for ps2pdf14 ou ps2pdf13 or ps2pdf12 or ps2pdf +# and set $ps2pdf to the correct value. +# +# +dnl @synopsis AC_PROG_PS2PDF +dnl +dnl This macro test if ps2pdf is installed. If ps2pdf +dnl is installed, it set $ps2pdf to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PS2PDF],[ +AC_CHECK_PROGS(ps2pdf,[ps2pdf14 ps2pdf13 ps2pdf12 ps2pdf],no) +export ps2pdf; +if test $ps2pdf = "no" ; +then + AC_MSG_ERROR([Unable to find a ps2pdf application]); +fi +AC_SUBST(ps2pdf) +]) diff --git a/support/autoconf/ac_prog_psbook.m4 b/support/autoconf/ac_prog_psbook.m4 new file mode 100644 index 0000000000..0c5f06fda5 --- /dev/null +++ b/support/autoconf/ac_prog_psbook.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PSBOOK +# +# Test for psbook +# and set $psbook to the correct value. +# +# +dnl @synopsis AC_PROG_PSBOOK +dnl +dnl This macro test if psbook is installed. If psbook +dnl is installed, it set $psbook to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PSBOOK],[ +AC_CHECK_PROGS(psbook,[psbook],no) +export psbook; +if test $psbook = "no" ; +then + AC_MSG_ERROR([Unable to find a psbook application]); +fi +AC_SUBST(psbook) +]) diff --git a/support/autoconf/ac_prog_psnup.m4 b/support/autoconf/ac_prog_psnup.m4 new file mode 100644 index 0000000000..d1fcf82db3 --- /dev/null +++ b/support/autoconf/ac_prog_psnup.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PSNUP +# +# Test for psnup +# and set $psnup to the correct value. +# +# +dnl @synopsis AC_PROG_PSNUP +dnl +dnl This macro test if psnup is installed. If psnup +dnl is installed, it set $psnup to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PSNUP],[ +AC_CHECK_PROGS(psnup,[psnup],no) +export psnup; +if test $psnup = "no" ; +then + AC_MSG_ERROR([Unable to find a psnup application]); +fi +AC_SUBST(psnup) +]) diff --git a/support/autoconf/ac_prog_psresize.m4 b/support/autoconf/ac_prog_psresize.m4 new file mode 100644 index 0000000000..50ad12696d --- /dev/null +++ b/support/autoconf/ac_prog_psresize.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PSRESIZE +# +# Test for psresize +# and set $psresize to the correct value. +# +# +dnl @synopsis AC_PROG_PSRESIZE +dnl +dnl This macro test if psresize is installed. If psresize +dnl is installed, it set $psresize to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PSRESIZE],[ +AC_CHECK_PROGS(psresize,[psresize],no) +export psresize; +if test $psresize = "no" ; +then + AC_MSG_ERROR([Unable to find a psresize application]); +fi +AC_SUBST(psresize) +]) diff --git a/support/autoconf/ac_prog_psselect.m4 b/support/autoconf/ac_prog_psselect.m4 new file mode 100644 index 0000000000..4ca0b088df --- /dev/null +++ b/support/autoconf/ac_prog_psselect.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_PSSELECT +# +# Test for psselect +# and set $psselect to the correct value. +# +# +dnl @synopsis AC_PROG_PSSELECT +dnl +dnl This macro test if psselect is installed. If psselect +dnl is installed, it set $psselect to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_PSSELECT],[ +AC_CHECK_PROGS(psselect,[psselect],no) +export psselect; +if test $psselect = "no" ; +then + AC_MSG_ERROR([Unable to find a psselect application]); +fi +AC_SUBST(psselect) +]) diff --git a/support/autoconf/ac_prog_texhash.m4 b/support/autoconf/ac_prog_texhash.m4 new file mode 100644 index 0000000000..12c8926da3 --- /dev/null +++ b/support/autoconf/ac_prog_texhash.m4 @@ -0,0 +1,41 @@ +# +# 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_PROG_TEXHASH +# +# Test for texhash +# and set $texhash to the correct value. +# +# +dnl @synopsis AC_PROG_TEXHASH +dnl +dnl This macro test if texhash is installed. If texhash +dnl is installed, it set $texhash to the right value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_PROG_TEXHASH],[ +AC_CHECK_PROGS(texhash,[texhash],no) +export texhash; +if test $texhash = "no" ; +then + AC_MSG_ERROR([Unable to find the texhash application]); +fi +AC_SUBST(texhash) +]) diff --git a/support/autoconf/ac_texmf_path.m4 b/support/autoconf/ac_texmf_path.m4 new file mode 100644 index 0000000000..e599e9cf03 --- /dev/null +++ b/support/autoconf/ac_texmf_path.m4 @@ -0,0 +1,72 @@ +# +# 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_TEXMF_PATH +# +# Test for a local texmf path +# and set $texmfpath to the correct value. +# +# +dnl @synopsis AC_TEXMF_PATH +dnl +dnl This macro test for a local texmf path and +dnl set $texmfpath to the correct value +dnl +dnl @version 1.3 +dnl @author Mathieu Boretti boretti@eig.unige.ch +dnl +AC_DEFUN([AC_TEXMF_PATH],[ +AC_ARG_WITH([texmf-path],AC_HELP_STRING([--with-texmf-path=...],[specify default local texmf path]),[ + if test ! "$withval" = "yes" ; + then + ac_cv_texmf_path="$withval" ; export ac_cv_texmf_path; + fi; +],[ + texmfpath=""; export texmfpath; +]) +AC_REQUIRE([AC_PROG_LATEX]) +AC_REQUIRE([AC_PROG_AWK]) +AC_REQUIRE([AC_LATEX_CLASS_REPORT]) +AC_CACHE_CHECK([for texmf local path],[ac_cv_texmf_path],[ + Base=`$kpsewhich report.cls` ; export Base ; + Base=`echo $Base | $AWK -F / '{for(i=1;i<NF;i++) {if ($i=="texmf") break; OUT=OUT$i"/";} print OUT}'` ; export Base ; + if test -x "$Base/texmf.local" ; + then + Base="$Base/texmf.local" ; export Base; + else + if test -x "$Base/texmf-local" ; + then + Base="$Base/texmf-local" ; export Base; + else + if test -x "$Base/texmf" ; + then + Base="$Base/texmf" ; export Base; + else + Base="no"; export Base; + fi; + fi; + fi; + ac_cv_texmf_path="$Base" ; export ac_cv_texmf_path; +]) +texmfpath=$ac_cv_texmf_path ; export texmfpath; +if test "$texmfpath" = "no" ; +then + AC_MSG_ERROR([Unable to find a local texmf folder. Use --with-texmf-path=... to specify it]) +fi +AC_SUBST(texmfpath) +]) diff --git a/support/autoconf/latex.m4 b/support/autoconf/latex.m4 new file mode 100644 index 0000000000..b9e5c22918 --- /dev/null +++ b/support/autoconf/latex.m4 @@ -0,0 +1,84 @@ +# +# latex.m4 +# 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 + +############################################################ +# # +# Fichier : latex.m4 # +# # +# Auteur : Boretti Mathieu # +# # +# Date : 2004-07-14 # +# # +############################################################ + +m4_include(ac_prog_latex.m4) +m4_include(ac_prog_pdflatex.m4) +m4_include(ac_prog_dvips.m4) +m4_include(ac_prog_dvipdf.m4) +m4_include(ac_prog_ps2pdf.m4) +m4_include(ac_prog_fig2dev.m4) +m4_include(_ac_latex_test.m4) +m4_include(ac_latex_class.m4) +m4_include(ac_latex_class_book.m4) +m4_include(ac_latex_class_report.m4) +m4_include(ac_latex_class_article.m4) +m4_include(ac_latex_classes.m4) +m4_include(ac_latex_package.m4) +m4_include(ac_latex_packages.m4) +m4_include(ac_latex_package_input.m4) +m4_include(ac_latex_package_opt.m4) +m4_include(ac_latex_package_fontenc.m4) +m4_include(ac_latex_package_amsmath.m4) +m4_include(ac_prog_gzip.m4) +m4_include(ac_prog_gunzip.m4) +m4_include(ac_prog_gnuplot.m4) +m4_include(ac_prog_mf.m4) +m4_include(ac_prog_bibtex.m4) +m4_include(ac_prog_latex2html.m4) +m4_include(ac_prog_latex2man.m4) +m4_include(ac_prog_makeindex.m4) +m4_include(ac_prog_jpeg2ps.m4) +m4_include(ac_latex_dvips_t.m4) +m4_include(ac_latex_dvips_t_a4.m4) +m4_include(ac_latex_dvips_t_letter.m4) +m4_include(ac_latex_dvips_t_a4_landscape.m4) +m4_include(ac_latex_dvips_t_letter_landscape.m4) +m4_include(ac_latex_dvips_o_stdout.m4) +m4_include(ac_prog_mktexpk.m4) +m4_include(ac_prog_texhash.m4) +m4_include(ac_prog_kpsewhich.m4) +m4_include(ac_texmf_path.m4) +m4_include(ac_prog_pngtopnm.m4) +m4_include(ac_prog_pnmtops.m4) +m4_include(ac_prog_jpegtopnm.m4) +m4_include(ac_prog_latex2png.m4) +m4_include(ac_prog_latex2rtf.m4) +m4_include(ac_prog_psbook.m4) +m4_include(ac_prog_psnup.m4) +m4_include(ac_prog_psselect.m4) +m4_include(ac_prog_psresize.m4) +m4_include(ac_prog_dvibook.m4) + +############################################################ +# A faire + +# Controler utilisation de fichier converti en .eps.gz et +# .eps.bb + +# ps2pdf - + |