IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 30, 2007, 6:24:33 PM (19 years ago)
Author:
Paul Price
Message:

Adding statistics generation and MD5 checksums for output. Replaced lots of configure.ac code with the IPP macros. Used to be building a library (why???), which has been removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/configure.ac

    r12164 r13104  
    2525fi
    2626
    27 dnl ------------------ kapa,libkapa options -------------------------
    28 dnl -- libkapa implies the requirement for libpng, libjpeg as well --
    2927
    30 dnl save LIBS/CFLAGS/LDFLAGS
    31 TMP_LIBS=${LIBS}
    32 TMP_CFLAGS=${CFLAGS}
    33 TMP_LDFLAGS=${LDFLAGS}
    34 TMP_CPPFLAGS=${CPPFLAGS}
    35 
    36 dnl test for command-line options: use ohana-config if not supplied
    37 KAPA_CFLAGS_CONFIG="true"
    38 KAPA_LIBS_CONFIG="true"
    39 AC_ARG_WITH(kapa,
    40 [AS_HELP_STRING(--with-kapa=DIR,Specify location of libkapa)],
    41 [KAPA_CFLAGS="-I$withval/include" KAPA_LIBS="-L$withval/lib"
    42  KAPA_CFLAGS_CONFIG="false"       KAPA_LIBS_CONFIG="false"])
    43 AC_ARG_WITH(kapa-include,
    44 [AS_HELP_STRING(--with-kapa-include=DIR,Specify libkapa include directory.)],
    45 [KAPA_CFLAGS="-I$withval" KAPA_CFLAGS_CONFIG="false"])
    46 AC_ARG_WITH(kapa-lib,
    47 [AS_HELP_STRING(--with-kapa-lib=DIR,Specify libkapa library directory.)],
    48 [KAPA_LIBS="-L$withval" KAPA_LIBS_CONFIG="false"])
    49 
    50 echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG"
    51 echo "KAPA_LIBS_CONFIG: $KAPA_LIBS_CONFIG"
    52 echo "KAPA_CFLAGS: $KAPA_CFLAGS"
    53 echo "KAPA_LIBS: $KAPA_LIBS"
    54 
    55 dnl HAVE_KAPA is set to false if any of the tests fail
    56 HAVE_KAPA="true"
    57 AC_MSG_NOTICE([checking for libkapa])
    58 if test "$KAPA_CFLAGS_CONFIG" = "true" -o "$KAPA_LIBS_CONFIG" = "true"; then
    59   AC_MSG_NOTICE([kapa info supplied by ohana-config])
    60   KAPA_CONFIG=`which ohana-config`
    61   AC_CHECK_FILE($KAPA_CONFIG,[],
    62     [HAVE_KAPA="false"; AC_MSG_WARN([libkapa is not found: output plots disabled.  Obtain libkapa at http://kiawe.ifa.hawaii.edu/Elixir/Ohana or use --with-kapa to specify location])])
    63  
    64   echo "HAVE_KAPA: $HAVE_KAPA"
    65   echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG"
    66 
    67   if test "$HAVE_KAPA" = "true" -a "$KAPA_CFLAGS_CONFIG" = "true" ; then
    68    AC_MSG_NOTICE([libkapa cflags info supplied by ohana-config])
    69    AC_MSG_CHECKING([libkapa cflags])
    70    KAPA_CFLAGS="`${KAPA_CONFIG} --cflags`"
    71    AC_MSG_RESULT([${KAPA_CFLAGS}])
    72   fi
    73 
    74   if test "$HAVE_KAPA" = "true" -a "$KAPA_LIBS_CONFIG" = "true" ; then
    75    AC_MSG_NOTICE([libkapa ldflags info supplied by ohana-config])
    76    AC_MSG_CHECKING([libkapa ldflags])
    77    KAPA_LIBS="`${KAPA_CONFIG} --libs` -lX11"
    78    AC_MSG_RESULT([${KAPA_LIBS}])
    79   fi
    80 fi
    81 
    82 if test "$HAVE_KAPA" = "true" ; then
    83  AC_MSG_NOTICE([libkapa supplied])
    84  PSWARP_CFLAGS="${PSWARP_CFLAGS} ${KAPA_CFLAGS}"
    85  PSWARP_LIBS="${PSWARP_LIBS} ${KAPA_LIBS}"
    86 else
    87  AC_MSG_NOTICE([libkapa ignored])
    88 fi
    89 
    90 dnl restore the CFLAGS/LDFLAGS
    91 LIBS=${TMP_LIBS}
    92 CFLAGS=${TMP_CFLAGS}
    93 LDFLAGS=${TMP_LDFLAGS}
    94 CPPFLAGS=${TMP_CPPFLAGS}
    95 
    96 dnl ------------------ libjpeg options ---------------------
    97 
    98 dnl save LIBS/CFLAGS/LDFLAGS
    99 TMP_LIBS=${LIBS}
    100 TMP_CFLAGS=${CFLAGS}
    101 TMP_LDFLAGS=${LDFLAGS}
    102 TMP_CPPFLAGS=${CPPFLAGS}
    103 
    104 AC_ARG_WITH(jpeg,
    105 [AS_HELP_STRING(--with-jpeg=DIR,Specify location of libjpeg.)],
    106 [JPEG_CFLAGS="-I$withval/include"
    107  JPEG_LDFLAGS="-L$withval/lib"])
    108 AC_ARG_WITH(jpeg-include,
    109 [AS_HELP_STRING(--with-jpeg-include=DIR,Specify libjpeg include directory.)],
    110 [JPEG_CFLAGS="-I$withval"])
    111 AC_ARG_WITH(jpeg-lib,
    112 [AS_HELP_STRING(--with-jpeg-lib=DIR,Specify libjpeg library directory.)],
    113 [JPEG_LDFLAGS="-L$withval"])
    114 
    115 CFLAGS="${CFLAGS} ${JPEG_CFLAGS}"
    116 CPPFLAGS=${CFLAGS}
    117 LDFLAGS="${LDFLAGS} ${JPEG_LDFLAGS}"
    118 
    119 AC_CHECK_HEADERS([jpeglib.h],
    120   [PSWARP_CFLAGS="$PSWARP_CFLAGS $JPEG_CFLAGS" AC_SUBST(JPEG_CFLAGS)],
    121   [HAVE_KAPA=false; AC_MSG_WARN([libjpeg headers not found: output plots disabled.  Obtain libjpeg from http://www.ijg.org/ or use --with-jpeg to specify location.])]
    122 )
    123 
    124 AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
    125   [PSWARP_LIBS="$PSWARP_LIBS $JPEG_LDFLAGS -ljpeg"],
    126   [HAVE_KAPA=false; AC_MSG_WARN([libjpeg library not found: output plots disabled.  Obtain libjpeg from http://www.ijg.org/ or use --with-jpeg to specify location.])]
    127 )
    128 
    129 dnl restore the CFLAGS/LDFLAGS
    130 LIBS=${TMP_LIBS}
    131 CFLAGS=${TMP_CFLAGS}
    132 LDFLAGS=${TMP_LDFLAGS}
    133 CPPFLAGS=${TMP_CPPFLAGS}
    134 
    135 dnl ------------------ libpng options ---------------------
    136 
    137 dnl save LIBS/CFLAGS/LDFLAGS
    138 TMP_LIBS=${LIBS}
    139 TMP_CFLAGS=${CFLAGS}
    140 TMP_LDFLAGS=${LDFLAGS}
    141 TMP_CPPFLAGS=${CPPFLAGS}
    142 
    143 AC_ARG_WITH(png,
    144 [AS_HELP_STRING(--with-png=DIR,Specify location of libpng.)],
    145 [PNG_CFLAGS="-I$withval/include"
    146  PNG_LDFLAGS="-L$withval/lib"])
    147 AC_ARG_WITH(png-include,
    148 [AS_HELP_STRING(--with-png-include=DIR,Specify libpng include directory.)],
    149 [PNG_CFLAGS="-I$withval"])
    150 AC_ARG_WITH(png-lib,
    151 [AS_HELP_STRING(--with-png-lib=DIR,Specify libpng library directory.)],
    152 [PNG_LDFLAGS="-L$withval"])
    153 
    154 CFLAGS="${CFLAGS} ${PNG_CFLAGS}"
    155 CPPFLAGS=${CFLAGS}
    156 LDFLAGS="${LDFLAGS} ${PNG_LDFLAGS}"
    157 
    158 AC_CHECK_HEADERS([png.h],
    159   [PSWARP_CFLAGS="$PSWARP_CFLAGS $PNG_CFLAGS" AC_SUBST(PNG_CFLAGS)],
    160   [HAVE_KAPA=false; AC_MSG_WARN([libpng headers not found: output plots disabled.  Obtain libpng from http://www.ijg.org/ or use --with-png to specify location.])]
    161 )
    162 
    163 AC_CHECK_LIB(png,png_init_io,
    164   [PSWARP_LIBS="$PSWARP_LIBS $PNG_LDFLAGS -lpng"],
    165   [HAVE_KAPA=false; AC_MSG_WARN([libpng library not found: output plots disabled.  Obtain libpng from http://www.ijg.org/ or use --with-png to specify location.])]
    166 )
    167 
    168 dnl restore the CFLAGS/LDFLAGS
    169 LIBS=${TMP_LIBS}
    170 CFLAGS=${TMP_CFLAGS}
    171 LDFLAGS=${TMP_LDFLAGS}
    172 CPPFLAGS=${TMP_CPPFLAGS}
    173 
    174 dnl ------------------ use kapa or not? ---------------------
    175 
    176 if test "$HAVE_KAPA" == "true" ; then
    177   AC_MSG_RESULT([including plotting functions])
    178   AC_DEFINE([HAVE_KAPA],[1],[enable use of libkapa])
    179 else
    180   AC_MSG_RESULT([skipping plotting functions])
    181   AC_DEFINE([HAVE_KAPA],[0],[disable use of libkapa])
    182 fi
    183 
    184 dnl ------------- psLib, psModules ---------------
    185 PKG_CHECK_MODULES(PSLIB, pslib >= 1.0.0)
    186 PKG_CHECK_MODULES(PSMODULE, psmodules >= 1.0.0)
     28PKG_CHECK_MODULES([PSLIB], [pslib >= 1.0.0])
     29PKG_CHECK_MODULES([PSMODULE], [psmodules >= 1.0.0])
     30PKG_CHECK_MODULES([PPSTATS], [ppStats >= 1.0.0])
    18731
    18832dnl Set CFLAGS for build
Note: See TracChangeset for help on using the changeset viewer.