Index: magicpoint-1.11b/configure.in =================================================================== --- magicpoint-1.11b/configure.in {cset b4d3ff90-24b8-4cde-9052-f5859b9ff17a} +++ magicpoint-1.11b/configure.in {local clone} @@ -292,27 +292,35 @@ done fi -for i in /usr/pkg /usr/local /usr; do - if test -f $i/include/libmng.h; then - if test -f $i/lib/libmng.a ; then - DEPLIBS="$DEPLIBS $i/lib/libmng.a" - elif test -f $i/lib/libmng.so ; then - DEPLIBS="$DEPLIBS $i/lib/libmng.so" - else - break; - fi - LIBS="$LIBS -L$i/lib" - OPTFLAGS="$OPTFLAGS -I$i/include" - AC_CHECK_LIB(mng, mng_initialize, - [LIBS="$LIBS -Wl,-rpath,$i/lib -lmng" - AC_DEFINE(MNG)], - [AC_CHECK_LIB(mng, mng_readdisplay, - [LIBS="$LIBS -lmng -ljpeg" - AC_DEFINE(MNG)], - [], [-ljpeg])]) - break - fi -done +AC_MSG_CHECKING(if mng handling is enabled) +AC_ARG_ENABLE(mng, + [ --enable-mng compile mng support in.], + [mgp_mng="$enableval"], + [mgp_mng="no"]) +AC_MSG_RESULT($mgp_mng) +if test $mgp_mng = "yes"; then + for i in /usr/pkg /usr/local /usr; do + if test -f $i/include/libmng.h; then + if test -f $i/lib/libmng.a ; then + DEPLIBS="$DEPLIBS $i/lib/libmng.a" + elif test -f $i/lib/libmng.so ; then + DEPLIBS="$DEPLIBS $i/lib/libmng.so" + else + break; + fi + LIBS="$LIBS -L$i/lib" + OPTFLAGS="$OPTFLAGS -I$i/include" + AC_CHECK_LIB(mng, mng_initialize, + [LIBS="$LIBS -Wl,-rpath,$i/lib -lmng" + AC_DEFINE(MNG)], + [AC_CHECK_LIB(mng, mng_readdisplay, + [LIBS="$LIBS -lmng -ljpeg" + AC_DEFINE(MNG)], + [], [-ljpeg])]) + break + fi + done +fi dnl Checks for header files. AC_PATH_X