Please check the GNU Autoconf Macro Archive for Updates
AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

acltx_compress_eps

Back to the Main Page.

Synopsis
ACLTX_COMPRESS_EPS([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
, 
Version

2006-07-16

Author

Boretti Mathieu <boretti@eig.unige.ch>

License

lgpl

Category

cryp.to ac-archive's LaTeX Support (released)

Documentation

this macro find a way to compress eps file, using Makefile target. If the way is found, set compress_eps to this way else set compress_eps to no

M4 Source Code
AC_DEFUN([ACLTX_COMPRESS_EPS],[
ACLTX_PROG_GZIP([AC_MSG_WARN([Unable to locate a gzip application to compress eps file])])
compress_eps=''; export compress_eps;
if test "$gzip" = "no" ; then
    AC_MSG_CHECKING(for a way to compress eps)
    AC_MSG_RESULT(no)
else
    AC_CHECK_PROGS(grep,grep,no)
    AC_MSG_CHECKING(for a way to compress eps)
    if test "$grep" = "no" ; then
    AC_MSG_RESULT(no)
    else
        compress_eps="%.eps.gz %.eps.bb : %.eps ; cat \[$]*.eps | grep \"%%BoundingBox\" &gt; \[$]*.eps.bb ; rm -f \[$]*.eps.gz ; gzip \[$]*.eps"; export compress_eps
        AC_MSG_RESULT($compress_eps)
    fi;
fi;
AC_SUBST(compress_eps)
ifelse($#,0,[],$#,1,[
    if test "$compress_eps" != "no" ;
    then
        $1
    fi
],$#,2,[
    ifelse($1,[],[
        if test "$compress_eps" = "no" ;
        then
            $2
        fi
    ],[
        if test "$compress_eps" != "no" ;
        then
            $1
        else
            $2
        fi
    ])
])
])