"Fossies" - the Fresh Open Source Software Archive

Member "littleutils-1.2.4/autoconf/configure.ac" (28 Mar 2021, 11443 Bytes) of package /linux/privat/littleutils-1.2.4.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.3_vs_1.2.4.

    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.50])
    5 AC_INIT([littleutils],[1.2.4])
    6 AC_CONFIG_MACRO_DIR([m4])
    7 AC_CONFIG_SRCDIR([littleutils/filesize.c])
    8 AC_CONFIG_AUX_DIR([autoconf])
    9 AC_CONFIG_HEADER([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/sysinfo.h])
   58 AC_CHECK_FUNCS([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           PDFDIFF='pdfidiff'
  119           PDFDIFFMAN='pdfidiff.1'
  120         else
  121           AC_MSG_WARN([img2pdf utility missing: skipping pdfidiff])
  122           PDFDIFF=''
  123           PDFDIFFMAN=''
  124         fi
  125       else
  126         AC_MSG_WARN([pdftocairo utility missing: skipping pdfidiff])
  127         PDFDIFF=''
  128         PDFDIFFMAN=''
  129       fi
  130     else
  131       AC_MSG_WARN([gs utility missing: skipping pdfidiff])
  132       PDFDIFF=''
  133       PDFDIFFMAN=''
  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     PDFDIFF=''
  142     PDFDIFFMAN=''
  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   PDFDIFF=''
  151   PDFDIFFMAN=''
  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 AC_CHECK_PROG(have_file,[file],[yes],[no])
  236 if test "$have_file" != 'no'; then
  237   AC_CHECK_PROG(have_gs,[gs],[yes],[no])
  238   if test "$have_gs" != 'no'; then
  239     AC_CHECK_PROG(have_pdftocairo,[pdftocairo],[yes],[no])
  240     if test "$have_pdftocairo" != 'no'; then
  241       OPTPDF='opt-pdf'
  242       OPTPDFMAN='opt-pdf.1'
  243     else
  244       AC_MSG_WARN([pdftocairo utility missing: skipping opt-pdf])
  245       OPTPDF=''
  246       OPTPDFMAN=''
  247     fi
  248   else
  249     AC_MSG_WARN([gs utility missing: skipping opt-pdf])
  250     OPTPDF=''
  251     OPTPDFMAN=''
  252   fi
  253   AC_CHECK_PROG(have_gzip,[gzip],[yes],[no])
  254   if test "$have_gzip" != 'no'; then
  255     TOGZIP='to-gzip'
  256     TOGZIPMAN='to-gzip.1'
  257   else
  258     AC_MSG_WARN([gzip utility missing: skipping to-gzip])
  259     TOGZIP=''
  260     TOGZIPMAN=''
  261   fi
  262   AC_CHECK_PROG(have_bzip2,[bzip2],[yes],[no])
  263   if test "$have_bzip2" != 'no'; then
  264     TOBZIP='to-bzip'
  265     TOBZIPMAN='to-bzip.1'
  266   else
  267     AC_MSG_WARN([bzip2 utility missing: skipping to-bzip])
  268     TOBZIP=''
  269     TOBZIPMAN=''
  270   fi
  271   AC_CHECK_PROG(have_7zr,[7zr],[yes],[no])
  272   if test "$have_7zr" != 'no'; then
  273     PROG7Z='7zr'
  274     TO7ZIP='to-7zip'
  275     TO7ZIPMAN='to-7zip.1'
  276   else
  277     AC_CHECK_PROG(have_7za,[7za],[yes],[no])
  278     if test "$have_7za" != 'no'; then
  279       PROG7Z='7za'
  280       TO7ZIP='to-7zip'
  281       TO7ZIPMAN='to-7zip.1'
  282     else
  283       AC_CHECK_PROG(have_7z,[7z],[yes],[no])
  284       if test "$have_7z" != 'no'; then
  285         PROG7Z='7z'
  286         TO7ZIP='to-7zip'
  287         TO7ZIPMAN='to-7zip.1'
  288       else
  289         AC_MSG_WARN([7zr/7za/7z utility missing: skipping to-7zip])
  290         PROG7Z=''
  291         TO7ZIP=''
  292         TO7ZIPMAN=''
  293       fi
  294     fi
  295   fi
  296   AC_CHECK_PROG(have_lzma_alone,[lzma_alone],[yes],[no])
  297   if test "$have_lzma_alone" != 'no'; then
  298     PROGLZMA='lzma_alone'
  299     TOLZMA='to-lzma'
  300     TOLZMAMAN='to-lzma.1'
  301   else
  302     AC_CHECK_PROG(have_lzma,[lzma],[yes],[no])
  303     if test "$have_lzma" != 'no'; then
  304       PROGLZMA='lzma'
  305       TOLZMA='to-lzma'
  306       TOLZMAMAN='to-lzma.1'
  307     else
  308       AC_MSG_WARN([lzma_alone and lzma utilities missing: skipping to-lzma])
  309       TOLZMA=''
  310       TOLZMAMAN=''
  311     fi
  312   fi
  313   AC_CHECK_PROG(have_lzip,[lzip],[yes],[no])
  314   if test "$have_lzip" != 'no'; then
  315     TOLZIP='to-lzip'
  316     TOLZIPMAN='to-lzip.1'
  317   else
  318     AC_MSG_WARN([lzip utility missing: skipping to-lzip])
  319     TOLZIP=''
  320     TOLZIPMAN=''
  321   fi
  322   AC_CHECK_PROG(have_xz,[xz],[yes],[no])
  323   if test "$have_xz" != 'no'; then
  324     TOXZ='to-xz'
  325     TOXZMAN='to-xz.1'
  326   else
  327     AC_MSG_WARN([xz utility missing: skipping to-xz])
  328     TOXZ=''
  329     TOXZMAN=''
  330   fi
  331   AC_CHECK_PROG(have_zstd,[zstd],[yes],[no])
  332   if test "$have_zstd" != 'no'; then
  333     TOZST='to-zst'
  334     TOZSTMAN='to-zst.1'
  335   else
  336     AC_MSG_WARN([zstd utility missing: skipping to-zst])
  337     TOZST=''
  338     TOZSTMAN=''
  339   fi
  340 else
  341   AC_MSG_WARN([file utility missing: skipping opt-pdf, to-gzip, to-bzip, to-7zip, to-lzip, to-lzma, to-xz, to-zst])
  342   OPTPDF=''
  343   OPTPDFMAN=''
  344   TOGZIPMAN=''
  345   TOGZIP=''
  346   TOGZIPMAN=''
  347   TOBZIP=''
  348   TOBZIPMAN=''
  349   TO7ZIP=''
  350   TO7ZIPMAN=''
  351   TOLZIP=''
  352   TOLZIPMAN=''
  353   TOLZMA=''
  354   TOLZMAMAN=''
  355   TOXZ=''
  356   TOXZMAN=''
  357   TOZST=''
  358   TOZSTMAN=''
  359 fi
  360 
  361 dnl Specify variables to be sent to output.
  362 AC_SUBST(FRENUM)
  363 AC_SUBST(FRENUMMAN)
  364 AC_SUBST(IMLIB2LIBS)
  365 AC_SUBST(IMLIB2MAN)
  366 AC_SUBST(IMLIB2PROGS)
  367 AC_SUBST(LIBDIRSTEM)
  368 AC_SUBST(LIBINTL)
  369 AC_SUBST(LCUCMAN)
  370 AC_SUBST(LCUCPROGS)
  371 AC_SUBST(LD)
  372 AC_SUBST(LNREPEATSMAN)
  373 AC_SUBST(LU_VERSION)
  374 AC_SUBST(OPTGIF)
  375 AC_SUBST(OPTGIFMAN)
  376 AC_SUBST(OPTJPG)
  377 AC_SUBST(OPTJPGMAN)
  378 AC_SUBST(OPTPDF)
  379 AC_SUBST(OPTPDFMAN)
  380 AC_SUBST(OPTPNG)
  381 AC_SUBST(OPTPNGMAN)
  382 AC_SUBST(PDFDIFF)
  383 AC_SUBST(PDFDIFFMAN)
  384 AC_SUBST(PNGLIBS)
  385 AC_SUBST(PNGMAN)
  386 AC_SUBST(PNGPROGS)
  387 AC_SUBST(PYMAN)
  388 AC_SUBST(PYPROGS)
  389 AC_SUBST(PREN)
  390 AC_SUBST(PRENMAN)
  391 AC_SUBST(PROG7Z)
  392 AC_SUBST(PROGLZMA)
  393 AC_SUBST(RECOMPJPG)
  394 AC_SUBST(RECOMPJPGMAN)
  395 AC_SUBST(REPEATSPL)
  396 AC_SUBST(ROTJPG)
  397 AC_SUBST(ROTJPGMAN)
  398 AC_SUBST(TOGZIP)
  399 AC_SUBST(TOGZIPMAN)
  400 AC_SUBST(TOBZIP)
  401 AC_SUBST(TOBZIPMAN)
  402 AC_SUBST(TO7ZIP)
  403 AC_SUBST(TO7ZIPMAN)
  404 AC_SUBST(TOLZIP)
  405 AC_SUBST(TOLZIPMAN)
  406 AC_SUBST(TOLZMA)
  407 AC_SUBST(TOLZMAMAN)
  408 AC_SUBST(TOXZ)
  409 AC_SUBST(TOXZMAN)
  410 AC_SUBST(TOZST)
  411 AC_SUBST(TOZSTMAN)
  412 
  413 dnl Write various makefiles.
  414 AC_CONFIG_FILES([Makefile extra/Makefile littleutils/Makefile imageutils/Makefile repeats/Makefile scripts/Makefile])
  415 AC_OUTPUT
  416 
  417 dnl Indicate configuration completion.
  418 echo ''
  419 echo "Configuration of ${PACKAGE_NAME}-${PACKAGE_VERSION} for $host complete."
  420 echo ''
  421 echo "CC=$CC"
  422 echo "CFLAGS=$CFLAGS"
  423 echo "LDFLAGS=$LDFLAGS"
  424 echo "LIBS=$LIBS"
  425 echo "LIBINTL=$LIBINTL"
  426 echo "IMLIB2LIBS=$IMLIB2LIBS"
  427 echo "PNGLIBS=$PNGLIBS"
  428 echo ''
  429 if test "$GNUMAKE_FOUND" = 'no'; then
  430   echo 'Warning:  The makefiles in the littleutils package use GNU make'
  431   echo "  extensions.  Your $MAKE utility appears to be something besides"
  432   echo '  GNU Make and may fail to build the littleutils properly.'
  433   echo ''
  434 fi