Changeset 29542 for trunk/psLib/configure.ac
- Timestamp:
- Oct 25, 2010, 12:54:22 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psLib/configure.ac (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/configure.ac
r24322 r29542 202 202 CPPFLAGS=${TMP_CPPFLAGS} 203 203 204 dnl ------------------ kapa,libkapa options ------------------------- 205 dnl -- libkapa implies the requirement for libpng, libjpeg as well -- 206 207 dnl save LIBS/CFLAGS/LDFLAGS 208 TMP_LIBS=${LIBS} 209 TMP_CFLAGS=${CFLAGS} 210 TMP_LDFLAGS=${LDFLAGS} 211 TMP_CPPFLAGS=${CPPFLAGS} 212 213 dnl test for command-line options: use ohana-config if not supplied 214 KAPA_CFLAGS_CONFIG="true" 215 KAPA_LIBS_CONFIG="true" 216 AC_ARG_WITH(kapa, 217 [AS_HELP_STRING(--with-kapa=DIR,Specify location of libkapa)], 218 [KAPA_CFLAGS="-I$withval/include" KAPA_LIBS="-L$withval/lib" 219 KAPA_CFLAGS_CONFIG="false" KAPA_LIBS_CONFIG="false"]) 220 AC_ARG_WITH(kapa-include, 221 [AS_HELP_STRING(--with-kapa-include=DIR,Specify libkapa include directory.)], 222 [KAPA_CFLAGS="-I$withval" KAPA_CFLAGS_CONFIG="false"]) 223 AC_ARG_WITH(kapa-lib, 224 [AS_HELP_STRING(--with-kapa-lib=DIR,Specify libkapa library directory.)], 225 [KAPA_LIBS="-L$withval" KAPA_LIBS_CONFIG="false"]) 226 227 echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG" 228 echo "KAPA_LIBS_CONFIG: $KAPA_LIBS_CONFIG" 229 echo "KAPA_CFLAGS: $KAPA_CFLAGS" 230 echo "KAPA_LIBS: $KAPA_LIBS" 231 232 dnl HAVE_KAPA is set to false if any of the tests fail 233 HAVE_KAPA="true" 234 AC_MSG_NOTICE([checking for libkapa]) 235 if test "$KAPA_CFLAGS_CONFIG" = "true" -o "$KAPA_LIBS_CONFIG" = "true"; then 236 AC_MSG_NOTICE([kapa info supplied by ohana-config]) 237 KAPA_CONFIG=`which ohana-config` 238 AC_CHECK_FILE($KAPA_CONFIG,[], 239 [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])]) 240 241 echo "HAVE_KAPA: $HAVE_KAPA" 242 echo "KAPA_CFLAGS_CONFIG: $KAPA_CFLAGS_CONFIG" 243 244 if test "$HAVE_KAPA" = "true" -a "$KAPA_CFLAGS_CONFIG" = "true" ; then 245 AC_MSG_NOTICE([libkapa cflags info supplied by ohana-config]) 246 AC_MSG_CHECKING([libkapa cflags]) 247 KAPA_CFLAGS="`${KAPA_CONFIG} --cflags`" 248 AC_MSG_RESULT([${KAPA_CFLAGS}]) 249 fi 250 251 if test "$HAVE_KAPA" = "true" -a "$KAPA_LIBS_CONFIG" = "true" ; then 252 AC_PATH_X 253 if test "$no_x" = "yes" ; then 254 AC_MSG_WARN([X11 not found: output plots using kapa disabled. Use --x-includes and --x-libraries if required.]) 255 HAVE_KAPA="false" 256 else 257 AC_MSG_NOTICE([libkapa ldflags info supplied by ohana-config]) 258 AC_MSG_CHECKING([libkapa ldflags]) 259 if test -n "$x_libraries" ; then 260 KAPA_LIBS="`${KAPA_CONFIG} --libs` -L$x_libraries -lX11" 261 else 262 KAPA_LIBS="`${KAPA_CONFIG} --libs` -lX11" 263 fi 264 if test -n "$x_includes" ; then 265 KAPA_CFLAGS="${KAPA_CFLAGS} -I$x_includes" 266 else 267 KAPA_CFLAGS="${KAPA_CFLAGS}" 268 fi 269 AC_MSG_RESULT([${KAPA_LIBS}]) 270 fi 271 fi 272 fi 273 274 if test "$HAVE_KAPA" = "true" ; then 275 AC_MSG_NOTICE([libkapa supplied]) 276 PSLIB_CFLAGS="${PSLIB_CFLAGS} ${KAPA_CFLAGS}" 277 PSLIB_LIBS="${PSLIB_LIBS} ${KAPA_LIBS}" 278 else 279 AC_MSG_NOTICE([libkapa ignored]) 280 fi 281 204 282 dnl ------------------ libjpeg options --------------------- 205 283 … … 239 317 LDFLAGS=${TMP_LDFLAGS} 240 318 CPPFLAGS=${TMP_CPPFLAGS} 319 320 dnl ------------------ libpng options --------------------- 321 322 dnl save LIBS/CFLAGS/LDFLAGS 323 TMP_LIBS=${LIBS} 324 TMP_CFLAGS=${CFLAGS} 325 TMP_LDFLAGS=${LDFLAGS} 326 TMP_CPPFLAGS=${CPPFLAGS} 327 328 AC_ARG_WITH(png, 329 [AS_HELP_STRING(--with-png=DIR,Specify location of libpng.)], 330 [PNG_CFLAGS="-I$withval/include" 331 PNG_LDFLAGS="-L$withval/lib"]) 332 AC_ARG_WITH(png-include, 333 [AS_HELP_STRING(--with-png-include=DIR,Specify libpng include directory.)], 334 [PNG_CFLAGS="-I$withval"]) 335 AC_ARG_WITH(png-lib, 336 [AS_HELP_STRING(--with-png-lib=DIR,Specify libpng library directory.)], 337 [PNG_LDFLAGS="-L$withval"]) 338 339 CFLAGS="${CFLAGS} ${PNG_CFLAGS}" 340 CPPFLAGS=${CFLAGS} 341 LDFLAGS="${LDFLAGS} ${PNG_LDFLAGS}" 342 343 AC_CHECK_HEADERS([png.h], 344 [PSLIB_CFLAGS="$PSLIB_CFLAGS $PNG_CFLAGS" AC_SUBST(PNG_CFLAGS)], 345 [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.])] 346 ) 347 348 AC_CHECK_LIB(png,png_init_io, 349 [PSLIB_LIBS="$PSLIB_LIBS $PNG_LDFLAGS -lpng"], 350 [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.])] 351 ) 352 353 dnl restore the CFLAGS/LDFLAGS 354 LIBS=${TMP_LIBS} 355 CFLAGS=${TMP_CFLAGS} 356 LDFLAGS=${TMP_LDFLAGS} 357 CPPFLAGS=${TMP_CPPFLAGS} 358 359 dnl ------------------ use kapa or not? --------------------- 360 361 if test "$HAVE_KAPA" == "true" ; then 362 AC_MSG_RESULT([including plotting functions]) 363 AC_DEFINE([HAVE_KAPA],[1],[enable use of libkapa]) 364 else 365 AC_MSG_RESULT([skipping plotting functions]) 366 AC_DEFINE([HAVE_KAPA],[0],[disable use of libkapa]) 367 fi 241 368 242 369 dnl ------------------- SWIG options ---------------------
Note:
See TracChangeset
for help on using the changeset viewer.
