--- psiconv/trunk/configure.in 2000/12/25 22:25:33 79 +++ psiconv/trunk/configure.in 2002/05/10 16:02:01 148 @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(lib/psiconv) -AM_INIT_AUTOMAKE(psiconv,0.8.0) +AC_INIT +AC_CONFIG_SRCDIR([lib/psiconv]) +AM_INIT_AUTOMAKE(psiconv,0.8.4) AM_CONFIG_HEADER(config.h) @@ -79,14 +80,10 @@ AC_MSG_CHECKING(whether GetMagickInfo works) AC_TRY_RUN([ #include - #include - #include - extern void OpenModules(void); - int main(void) { GetMagickInfo(NULL); - #if defined(HasLTDL) - OpenModules(); - #endif - return (NULL == GetMagickInfo(NULL)); }], + int main(void) { ExceptionInfo exception; + GetExceptionInfo(&exception); + OpenModules(&exception); + return (NULL == GetMagickInfo(NULL,&exception)); }], IMAGEMAGICK=yes,IMAGEMAGICK=no,IMAGEMAGICK=yes) AC_MSG_RESULT($IMAGEMAGICK) LDFLAGS="$LDFLAGS_OLD" @@ -100,7 +97,7 @@ fi if test x"$IMAGEMAGICK" = xyes ; then LIB_MAGICK="`Magick-config --libs` `Magick-config --ldflags`" - AC_DEFINE(IMAGEMAGICK) + AC_DEFINE(IMAGEMAGICK,1,[ImageMagick availability]) else LIB_MAGICK= fi @@ -180,8 +177,28 @@ dnl Checks for library functions. AC_FUNC_VPRINTF AC_REPLACE_FUNCS(strdup) -AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o") +AC_CHECK_FUNCS(getopt_long,,AC_LIBOBJ([getopt]);AC_LIBOBJ([getopt1])) +AC_ARG_ENABLE(dmalloc, +[ --enable-dmalloc Enable dmalloc for developers (default:off)], +[case "${enableval}" in + yes) dmalloc=yes ;; + no) dmalloc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-dmalloc) ;; +esac],[dmalloc=false]) +if test x"$dmalloc" = xyes; then + AC_CHECK_LIB(dmalloc,malloc,dmalloc=yes,dmalloc=no) +fi +if test x"$dmalloc" = xyes; then +AC_CHECK_HEADER(dmalloc.h,dmalloc=yes,dmalloc=no) +fi +if test x"$dmalloc" = xyes ; then + LIB_DMALLOC=-ldmalloc + AC_DEFINE(DMALLOC,1,[DMalloc availability]) +else + LIB_DMALLOC= +fi +AC_SUBST(LIB_DMALLOC) dnl With and without functions AC_ARG_ENABLE(html-docs, @@ -221,4 +238,5 @@ AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue) -AC_OUTPUT([Makefile compat/Makefile lib/Makefile lib/psiconv/Makefile program/Makefile program/psiconv/Makefile lib/psiconv/general.h formats/Makefile docs/Makefile extra/Makefile]) +AC_CONFIG_FILES([Makefile compat/Makefile lib/Makefile lib/psiconv/Makefile program/Makefile program/psiconv/Makefile lib/psiconv/general.h formats/Makefile docs/Makefile extra/Makefile]) +AC_OUTPUT