"Fossies" - the Fresh Open Source Software Archive

Member "littleutils-1.2.5/autoconf/configure.ac" (29 Oct 2021, 12111 Bytes) of package /linux/privat/littleutils-1.2.5.tar.lz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.2.4_vs_1.2.5.

    1 dnl Configure.in for the DOEgen package.  Process this file with autoconf to produce a configure script.
    2 
    3 dnl The basics.
    4 AC_PREREQ([2.71])
    5 AC_INIT([littleutils],[1.2.5])
    6 AC_CONFIG_MACRO_DIR([m4])
    7 AC_CONFIG_SRCDIR([littleutils/filesize.c])
    8 AC_CONFIG_AUX_DIR([autoconf])
    9 AC_CONFIG_HEADERS([config.h:autoconf/config_h.in])
   10 
   11 dnl Include files.
   12 m4_include([m4/host-cpu-c-abi.m4])
   13 m4_include([m4/lib-prefix.m4])
   14 
   15 dnl Determine canonical system type.
   16 AC_CANONICAL_BUILD
   17 AC_CANONICAL_HOST
   18 
   19 dnl Check for compilers and other development tools.
   20 AC_PROG_CC
   21 AC_CONFIG_AUX_DIR([autoconf])
   22 AC_PROG_INSTALL
   23 AC_PROG_MKDIR_P
   24 AC_PROG_SED
   25 
   26 dnl Make sure we're running GNU make.
   27 if test "X${MAKE}" = 'X'; then
   28   AC_CHECK_PROGS(MAKE,[gmake make])
   29 fi
   30 AC_MSG_CHECKING([that ${MAKE} is GNU Make])
   31 if ${MAKE} --version 2>/dev/null | head -n 1 | grep 'GNU Make' >/dev/null; then
   32   AC_MSG_RESULT([yes])
   33   GNUMAKE_FOUND=yes
   34 else
   35   AC_MSG_RESULT([no])
   36   GNUMAKE_FOUND=no
   37 fi
   38 
   39 dnl Set various link and compile variables.
   40 LD="$CC"
   41 if test "X$GCC" = 'Xyes'; then
   42   if test "X$CFLAGS" = 'X'; then
   43     CFLAGS='-O2 -Wall'
   44   fi
   45 else
   46   if test "X$CFLAGS" = 'X'; then
   47     CFLAGS='-O'
   48   fi
   49 fi
   50 
   51 dnl Check for endianness, largefile support, various header files, specific functions, and libraries.
   52 AC_C_BIGENDIAN
   53 AC_LIB_PREPARE_MULTILIB
   54 LIBDIRSTEM=$acl_libdirstem2
   55 echo "checking for multilib install prefix... $LIBDIRSTEM"
   56 AC_SYS_LARGEFILE
   57 AC_CHECK_HEADERS([byteswap.h getopt.h libintl.h locale.h stdalign.h stddef.h sys/random.h sys/sysinfo.h])
   58 AC_CHECK_FUNCS([clock_gettime getrandom fseeko lrand48 random realpath])
   59 AC_CHECK_MEMBERS([[struct stat.st_mtim.tv_nsec],[struct stat.st_mtimespec.tv_nsec],
   60   [struct stat.st_mtimensec]],[],[],[[#include <sys/stat.h>]])
   61 dnl getopt check
   62 have_getopt=yes
   63 AC_CHECK_FUNC([getopt],,[AC_CHECK_LIB([iberty],[getopt],,have_getopt=no)])
   64 if test "$have_getopt" = 'no'; then
   65   AC_MSG_ERROR([getopt function not found: aborting configure...])
   66 fi
   67 dnl gettext check
   68 have_gettext=yes
   69 AC_CHECK_FUNC([gettext],LIBINTL='',
   70   [AC_CHECK_LIB([intl],[gettext],LIBINTL='-lintl',have_gettext=no)])
   71 if test "$have_gettext" = 'yes'; then
   72   FRENUM="frenum${EXEEXT}"
   73   FRENUMMAN='frenum.1'
   74 else
   75   AC_MSG_WARN([gettext function not found: skipping frenum])
   76   FRENUM=''
   77   FRENUMMAN=''
   78 fi
   79 dnl PNG and zlib library checks
   80 AC_CHECK_HEADERS([png.h],have_png_hdrs='yes',have_png_hdrs='no')
   81 AC_CHECK_HEADERS([zlib.h],have_zlib_hdrs='yes',have_zlib_hdrs='no')
   82 if test "$have_png_hdrs" = 'yes' -a "$have_zlib_hdrs" = 'yes'; then
   83   AC_CHECK_LIB([png],[png_get_io_ptr],have_png_libs='yes',have_png_libs='no',[-lz -lm])
   84   if test "$have_png_libs" = 'yes'; then
   85     have_png=yes
   86     PNGPROGS="pngrecolor${EXEEXT} pngstrip${EXEEXT}"
   87     PNGMAN='pngrecolor.1 pngstrip.1'
   88     PNGLIBS='-lpng -lz -lm'
   89   else
   90     have_png=no
   91     AC_MSG_WARN([png library not found: skipping pngrecolor, pngstrip, opt-gif, and opt-png])
   92     PNGPROGS=''
   93     PNGMAN=''
   94     PNGLIBS=''
   95   fi
   96 else
   97   have_png=no
   98   AC_MSG_WARN([png/zlib headers not found: skipping pngrecolor, pngstrip, opt-gif, and opt-png])
   99   PNGPROGS=''
  100   PNGMAN=''
  101   PNGLIBS=''
  102 fi
  103 dnl Imlib2 library checks
  104 AC_CHECK_HEADERS([Imlib2.h],have_imlib2_hdr='yes',have_imlib2_hdr='no')
  105 if test "$have_imlib2_hdr" = 'yes'; then
  106   AC_CHECK_LIB([Imlib2],[imlib_load_image],have_imlib2_lib='yes',have_imlib2_lib='no',[-lImlib2])
  107   if test "$have_imlib2_lib" = 'yes'; then
  108     have_imlib2=yes
  109     IMLIB2PROGS="imagdiff${EXEEXT}"
  110     IMLIB2MAN='imagdiff.1'
  111     IMLIB2LIBS='-lImlib2'
  112     AC_CHECK_PROG(have_gs,[gs],[yes],[no])
  113     if test "$have_gs" != 'no'; then
  114       AC_CHECK_PROG(have_pdftocairo,[pdftocairo],[yes],[no])
  115       if test "$have_pdftocairo" != 'no'; then
  116         AC_CHECK_PROG(have_img2pdf,[img2pdf],[yes],[no])
  117         if test "$have_img2pdf" != 'no'; then
  118           PDFIDIFF='pdfidiff'
  119           PDFIDIFFMAN='pdfidiff.1'
  120         else
  121           AC_MSG_WARN([img2pdf utility missing: skipping pdfidiff])
  122           PDFIDIFF=''
  123           PDFIDIFFMAN=''
  124         fi
  125       else
  126         AC_MSG_WARN([pdftocairo utility missing: skipping pdfidiff])
  127         PDFIDIFF=''
  128         PDFIDIFFMAN=''
  129       fi
  130     else
  131       AC_MSG_WARN([gs utility missing: skipping pdfidiff])
  132       PDFIDIFF=''
  133       PDFIDIFFMAN=''
  134     fi
  135   else
  136     have_imlib2=no
  137     AC_MSG_WARN([Imlib2 library not found: skipping imagdiff and pdfidiff])
  138     IMLIB2PROGS=''
  139     IMLIB2MAN=''
  140     IMLIB2LIBS=''
  141     PDFIDIFF=''
  142     PDFIDIFFMAN=''
  143   fi
  144 else
  145   have_imlib2=no
  146   AC_MSG_WARN([Imlib2 headers not found: skipping imagdiff and pdfidiff])
  147   IMLIB2PROGS=''
  148   IMLIB2MAN=''
  149   IMLIB2LIBS=''
  150   PDFIDIFF=''
  151   PDFIDIFFMAN=''
  152 fi
  153 
  154 dnl External utility checks
  155 AC_PATH_PROG(PROGBASH,[bash],[no])
  156 if test "$PROGBASH" = 'no'; then
  157   AC_MSG_ERROR([bash not found: aborting configure...])
  158 fi
  159 AC_PATH_PROG(PROGPERL,[perl],[no])
  160 if test "$PROGPERL" != 'no'; then
  161   LCUCPROGS='lowercase uppercase'
  162   LCUCMAN='lowercase.1 uppercase.1'
  163   PREN='pren'
  164   PRENMAN='pren.1'
  165   echo -n 'checking for CryptX module... '
  166   perl -MCryptX -e 1 2> /dev/null
  167   if test "$?" = '0'; then
  168     echo 'yes'
  169     REPEATSPL='repeats.pl'
  170     LNREPEATSMAN='YES'
  171   else
  172     echo 'no'
  173     AC_MSG_WARN([CryptX module (in libcryptx-perl) missing: skipping repeats.pl])
  174     REPEATSPL=''
  175     LNREPEATSMAN='NO'
  176   fi
  177 else
  178   AC_MSG_WARN([perl missing: skipping lowercase, uppercase, pren, and repeats.pl])
  179   LCUCPROGS=''
  180   LCUCMAN=''
  181   PREN=''
  182   PRENMAN=''
  183   REPEATSPL=''
  184 fi
  185 AC_PATH_PROG(PROGPYTHON,[python3],[no])
  186 if test "$PROGPYTHON" != 'no'; then
  187   PYPROGS='rar2tarcat zip2tarcat'
  188   PYMAN='rar2tarcat.1 zip2tarcat.1'
  189 else
  190   AC_MSG_WARN([python3 missing: skipping rar2tarcat zip2tarcat])
  191   PYPROGS=''
  192   PYMAN=''
  193 fi
  194 AC_CHECK_PROG(have_gifsicle,[gifsicle],[yes],[no])
  195 AC_CHECK_PROG(have_pngcrush,[pngcrush],[yes],[no])
  196 if test "$have_gifsicle" != 'no'; then
  197   OPTGIF='opt-gif'
  198   OPTGIFMAN='opt-gif.1'
  199 else
  200   AC_MSG_WARN([gifsicle utility missing: skipping opt-gif])
  201   OPTGIF=''
  202   OPTGIFMAN=''
  203 fi
  204 if test "$have_png" = 'yes' -a "$have_pngcrush" != 'no'; then
  205   OPTPNG='opt-png'
  206   OPTPNGMAN='opt-png.1'
  207 else
  208   AC_MSG_WARN([png/zlib headers or pngcrush utility missing: skipping opt-png])
  209   OPTPNG=''
  210   OPTPNGMAN=''
  211 fi
  212 AC_CHECK_PROG(have_jpegtran,[jpegtran],[yes],[no])
  213 if test "$have_jpegtran" != 'no'; then
  214   OPTJPG='opt-jpg'
  215   OPTJPGMAN='opt-jpg.1'
  216   ROTJPG='rot-jpg'
  217   ROTJPGMAN='rot-jpg.1'
  218   if test "$PROGPERL" != 'no'; then
  219     RECOMPJPG='recomp-jpg'
  220     RECOMPJPGMAN='recomp-jpg.1'
  221   else
  222     AC_MSG_WARN([perl utility missing: skipping recomp-jpg])
  223     RECOMPJPG=''
  224     RECOMPJPGMAN=''
  225   fi
  226 else
  227   AC_MSG_WARN([jpegtran utility missing: skipping opt-jpg, rot-jpg, and recomp-jpg])
  228   OPTJPG=''
  229   OPTJPGMAN=''
  230   ROTJPG=''
  231   ROTJPGMAN=''
  232   RECOMPJPG=''
  233   RECOMPJPGMAN=''
  234 fi
  235 if test "$have_img2pdf" != 'no'; then
  236   if test "$have_pdftocairo" != 'no'; then
  237     AC_CHECK_PROG(have_pngquant,[pngquant],[yes],[no])
  238     if test "$have_pngquant" != 'no'; then
  239       PDFQUANT='pdfquant'
  240       PDFQUANTMAN='pdfquant.1'
  241     else
  242       AC_MSG_WARN([pngquant utility missing: skipping pdfquant])
  243       PDFQUANT=''
  244       PDFQUANTMAN=''
  245     fi
  246   else
  247     AC_MSG_WARN([poppler utilities presumed missing: skipping pdfquant])
  248     PDFQUANT=''
  249     PDFQUANTMAN=''
  250   fi
  251 else
  252   AC_MSG_WARN([img2pdf utility missing: skipping pdfquant])
  253   PDFQUANT=''
  254   PDFQUANTMAN=''
  255 fi
  256 AC_CHECK_PROG(have_file,[file],[yes],[no])
  257 if test "$have_file" != 'no'; then
  258   AC_CHECK_PROG(have_gs,[gs],[yes],[no])
  259   if test "$have_gs" != 'no'; then
  260     AC_CHECK_PROG(have_pdftocairo,[pdftocairo],[yes],[no])
  261     if test "$have_pdftocairo" != 'no'; then
  262       OPTPDF='opt-pdf'
  263       OPTPDFMAN='opt-pdf.1'
  264     else
  265       AC_MSG_WARN([pdftocairo utility missing: skipping opt-pdf])
  266       OPTPDF=''
  267       OPTPDFMAN=''
  268     fi
  269   else
  270     AC_MSG_WARN([gs utility missing: skipping opt-pdf])
  271     OPTPDF=''
  272     OPTPDFMAN=''
  273   fi
  274   AC_CHECK_PROG(have_gzip,[gzip],[yes],[no])
  275   if test "$have_gzip" != 'no'; then
  276     TOGZIP='to-gzip'
  277     TOGZIPMAN='to-gzip.1'
  278   else
  279     AC_MSG_WARN([gzip utility missing: skipping to-gzip])
  280     TOGZIP=''
  281     TOGZIPMAN=''
  282   fi
  283   AC_CHECK_PROG(have_bzip2,[bzip2],[yes],[no])
  284   if test "$have_bzip2" != 'no'; then
  285     TOBZIP='to-bzip'
  286     TOBZIPMAN='to-bzip.1'
  287   else
  288     AC_MSG_WARN([bzip2 utility missing: skipping to-bzip])
  289     TOBZIP=''
  290     TOBZIPMAN=''
  291   fi
  292   AC_CHECK_PROG(have_7zr,[7zr],[yes],[no])
  293   if test "$have_7zr" != 'no'; then
  294     PROG7Z='7zr'
  295     TO7ZIP='to-7zip'
  296     TO7ZIPMAN='to-7zip.1'
  297   else
  298     AC_CHECK_PROG(have_7za,[7za],[yes],[no])
  299     if test "$have_7za" != 'no'; then
  300       PROG7Z='7za'
  301       TO7ZIP='to-7zip'
  302       TO7ZIPMAN='to-7zip.1'
  303     else
  304       AC_CHECK_PROG(have_7z,[7z],[yes],[no])
  305       if test "$have_7z" != 'no'; then
  306         PROG7Z='7z'
  307         TO7ZIP='to-7zip'
  308         TO7ZIPMAN='to-7zip.1'
  309       else
  310         AC_MSG_WARN([7zr/7za/7z utility missing: skipping to-7zip])
  311         PROG7Z=''
  312         TO7ZIP=''
  313         TO7ZIPMAN=''
  314       fi
  315     fi
  316   fi
  317   AC_CHECK_PROG(have_lzma_alone,[lzma_alone],[yes],[no])
  318   if test "$have_lzma_alone" != 'no'; then
  319     PROGLZMA='lzma_alone'
  320     TOLZMA='to-lzma'
  321     TOLZMAMAN='to-lzma.1'
  322   else
  323     AC_CHECK_PROG(have_lzma,[lzma],[yes],[no])
  324     if test "$have_lzma" != 'no'; then
  325       PROGLZMA='lzma'
  326       TOLZMA='to-lzma'
  327       TOLZMAMAN='to-lzma.1'
  328     else
  329       AC_MSG_WARN([lzma_alone and lzma utilities missing: skipping to-lzma])
  330       TOLZMA=''
  331       TOLZMAMAN=''
  332     fi
  333   fi
  334   AC_CHECK_PROG(have_lzip,[lzip],[yes],[no])
  335   if test "$have_lzip" != 'no'; then
  336     TOLZIP='to-lzip'
  337     TOLZIPMAN='to-lzip.1'
  338   else
  339     AC_MSG_WARN([lzip utility missing: skipping to-lzip])
  340     TOLZIP=''
  341     TOLZIPMAN=''
  342   fi
  343   AC_CHECK_PROG(have_xz,[xz],[yes],[no])
  344   if test "$have_xz" != 'no'; then
  345     TOXZ='to-xz'
  346     TOXZMAN='to-xz.1'
  347   else
  348     AC_MSG_WARN([xz utility missing: skipping to-xz])
  349     TOXZ=''
  350     TOXZMAN=''
  351   fi
  352   AC_CHECK_PROG(have_zstd,[zstd],[yes],[no])
  353   if test "$have_zstd" != 'no'; then
  354     TOZST='to-zst'
  355     TOZSTMAN='to-zst.1'
  356   else
  357     AC_MSG_WARN([zstd utility missing: skipping to-zst])
  358     TOZST=''
  359     TOZSTMAN=''
  360   fi
  361 else
  362   AC_MSG_WARN([file utility missing: skipping opt-pdf, to-gzip, to-bzip, to-7zip, to-lzip, to-lzma, to-xz, to-zst])
  363   OPTPDF=''
  364   OPTPDFMAN=''
  365   TOGZIPMAN=''
  366   TOGZIP=''
  367   TOGZIPMAN=''
  368   TOBZIP=''
  369   TOBZIPMAN=''
  370   TO7ZIP=''
  371   TO7ZIPMAN=''
  372   TOLZIP=''
  373   TOLZIPMAN=''
  374   TOLZMA=''
  375   TOLZMAMAN=''
  376   TOXZ=''
  377   TOXZMAN=''
  378   TOZST=''
  379   TOZSTMAN=''
  380 fi
  381 
  382 dnl Specify variables to be sent to output.
  383 AC_SUBST(FRENUM)
  384 AC_SUBST(FRENUMMAN)
  385 AC_SUBST(IMLIB2LIBS)
  386 AC_SUBST(IMLIB2MAN)
  387 AC_SUBST(IMLIB2PROGS)
  388 AC_SUBST(LIBDIRSTEM)
  389 AC_SUBST(LIBINTL)
  390 AC_SUBST(LCUCMAN)
  391 AC_SUBST(LCUCPROGS)
  392 AC_SUBST(LD)
  393 AC_SUBST(LNREPEATSMAN)
  394 AC_SUBST(LU_VERSION)
  395 AC_SUBST(OPTGIF)
  396 AC_SUBST(OPTGIFMAN)
  397 AC_SUBST(OPTJPG)
  398 AC_SUBST(OPTJPGMAN)
  399 AC_SUBST(OPTPDF)
  400 AC_SUBST(OPTPDFMAN)
  401 AC_SUBST(OPTPNG)
  402 AC_SUBST(OPTPNGMAN)
  403 AC_SUBST(PDFIDIFF)
  404 AC_SUBST(PDFIDIFFMAN)
  405 AC_SUBST(PDFQUANT)
  406 AC_SUBST(PDFQUANTMAN)
  407 AC_SUBST(PNGLIBS)
  408 AC_SUBST(PNGMAN)
  409 AC_SUBST(PNGPROGS)
  410 AC_SUBST(PYMAN)
  411 AC_SUBST(PYPROGS)
  412 AC_SUBST(PREN)
  413 AC_SUBST(PRENMAN)
  414 AC_SUBST(PROG7Z)
  415 AC_SUBST(PROGLZMA)
  416 AC_SUBST(RECOMPJPG)
  417 AC_SUBST(RECOMPJPGMAN)
  418 AC_SUBST(REPEATSPL)
  419 AC_SUBST(ROTJPG)
  420 AC_SUBST(ROTJPGMAN)
  421 AC_SUBST(TOGZIP)
  422 AC_SUBST(TOGZIPMAN)
  423 AC_SUBST(TOBZIP)
  424 AC_SUBST(TOBZIPMAN)
  425 AC_SUBST(TO7ZIP)
  426 AC_SUBST(TO7ZIPMAN)
  427 AC_SUBST(TOLZIP)
  428 AC_SUBST(TOLZIPMAN)
  429 AC_SUBST(TOLZMA)
  430 AC_SUBST(TOLZMAMAN)
  431 AC_SUBST(TOXZ)
  432 AC_SUBST(TOXZMAN)
  433 AC_SUBST(TOZST)
  434 AC_SUBST(TOZSTMAN)
  435 
  436 dnl Write various makefiles.
  437 AC_CONFIG_FILES([Makefile extra/Makefile littleutils/Makefile imageutils/Makefile repeats/Makefile scripts/Makefile])
  438 AC_OUTPUT
  439 
  440 dnl Indicate configuration completion.
  441 echo ''
  442 echo "Configuration of ${PACKAGE_NAME}-${PACKAGE_VERSION} for $host complete."
  443 echo ''
  444 echo "CC=$CC"
  445 echo "CFLAGS=$CFLAGS"
  446 echo "LDFLAGS=$LDFLAGS"
  447 echo "LIBS=$LIBS"
  448 echo "LIBINTL=$LIBINTL"
  449 echo "IMLIB2LIBS=$IMLIB2LIBS"
  450 echo "PNGLIBS=$PNGLIBS"
  451 echo ''
  452 if test "$GNUMAKE_FOUND" = 'no'; then
  453   echo 'Warning:  The makefiles in the littleutils package use GNU make'
  454   echo "  extensions.  Your $MAKE utility appears to be something besides"
  455   echo '  GNU Make and may fail to build the littleutils properly.'
  456   echo ''
  457 fi