-AC_SUBST(ASNMODULE)
-AC_SUBST(ILLMODULE)
-AC_SUBST(ILLLIB)
-AC_ARG_ENABLE(comp,[ --disable-comp use old encoders, i.e. disable the YAZ ASN.1 Compiler], , enable_comp=yes)
-if test "$enable_comp" = "yes"; then
- ASNMODULE="z39.50"
- ILLMODULE="ill"
- ILLLIB=../ill/libill.la
- ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
- HFILE=z-proto.h
-else
- ILLMODULE=""
- ASNMODULE=asn
- ILLLIB=""
- ASN_MAKEFILES="asn/Makefile"
- HFILE=prt-proto.h
- if ! test -r include/yaz/prt-rsc.h ; then
- cp asn/*.h include/yaz
- fi
-fi
-AC_MSG_CHECKING(whether proto.h needs to be generated)
-yaz_include=${srcdir}/include/yaz
-if test -r ${yaz_include}/proto.h && cmp -s ${yaz_include}/$HFILE ${yaz_include}/proto.h; then
- AC_MSG_RESULT(no)
-else
- AC_MSG_RESULT(yes)
- cp -f ${yaz_include}/$HFILE ${yaz_include}/proto.h
+AC_SUBST(EXTRAMODULE)
+AC_SUBST(EXTRALIB)
+
+EXTRAMODULE="z39.50 zutil"
+
+AC_ARG_ENABLE(modules,[ --enable-modules=\"mod ..\" ill],[
+if test "$enable_modules" != "no"; then
+ EXTRAMODULE="$EXTRAMODULE $enable_modules"