Hi,
I have made some changes that enable compile-time disabling of aes4000
driver (which depends on ImageMagick), it should be no problem to extend
it to other drivers, maybe even in the way that NBIS would not be needed
is some situations (with only the upekts driver).
Please bear in mind that I don't have the hardware yet so only test done
on this is compiling without aes4000 on computer without ImageMagick and
with aes4000 on computer with ImageMagick, both successful.
Pavel
diff -ur a/configure.ac b/configure.ac
--- a/configure.ac 2008-07-17 14:06:12.000000000 +0200
+++ b/configure.ac 2008-07-17 14:05:30.000000000 +0200
@@ -18,6 +18,12 @@
AC_SUBST(lt_revision)
AC_SUBST(lt_age)
+AC_ARG_ENABLE([aes4000], [AS_HELP_STRING([--enable-aes4000],
+ [enable aes4000 driver (requires ImageMagick)])],
+ [enable_aes4000=$enableval],
+ [enable_aes4000='no'])
+AM_CONDITIONAL([ENABLE_AES4000], [test "$enable_aes4000" != "no"])
+
PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 0.9.1])
AC_SUBST(LIBUSB_CFLAGS)
AC_SUBST(LIBUSB_LIBS)
@@ -31,9 +37,11 @@
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
+if test "$enable_aes4000" != "no"; then
PKG_CHECK_MODULES(IMAGEMAGICK, "ImageMagick")
AC_SUBST(IMAGEMAGICK_CFLAGS)
AC_SUBST(IMAGEMAGICK_LIBS)
+fi;
# Examples build
AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
diff -ur a/libfprint/Makefile.am b/libfprint/Makefile.am
--- a/libfprint/Makefile.am 2008-07-17 14:06:23.000000000 +0200
+++ b/libfprint/Makefile.am 2008-07-17 14:05:27.000000000 +0200
@@ -10,7 +10,7 @@
FDU2000_SRC = drivers/fdu2000.c
VCOM5S_SRC = drivers/vcom5s.c
-DRIVER_SRC = $(UPEKTS_SRC) $(AES4000_SRC) $(AES2501_SRC) $(URU4000_SRC) $(VCOM5S_SRC) $(UPEKSONLY_SRC)
+DRIVER_SRC = $(UPEKTS_SRC) $(AES2501_SRC) $(URU4000_SRC) $(VCOM5S_SRC) $(UPEKSONLY_SRC)
#DRIVER_SRC = $(AES1610_SRC) $(UPEKTC_SRC) $(FDU2000_SRC)
NBIS_SRC = \
@@ -50,9 +50,15 @@
nbis/mindtct/sort.c \
nbis/mindtct/util.c
-libfprint_la_CFLAGS = -fvisibility=hidden -I$(srcdir)/nbis/include $(LIBUSB_CFLAGS) $(GLIB_CFLAGS) $(IMAGEMAGICK_CFLAGS) $(CRYPTO_CFLAGS) $(AM_CFLAGS)
+libfprint_la_CFLAGS = -fvisibility=hidden -I$(srcdir)/nbis/include $(LIBUSB_CFLAGS) $(GLIB_CFLAGS) $(CRYPTO_CFLAGS) $(AM_CFLAGS)
libfprint_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@
-libfprint_la_LIBADD = -lm $(LIBUSB_LIBS) $(GLIB_LIBS) $(IMAGEMAGICK_LIBS) $(CRYPTO_LIBS)
+libfprint_la_LIBADD = -lm $(LIBUSB_LIBS) $(GLIB_LIBS) $(CRYPTO_LIBS)
+
+if ENABLE_AES4000
+DRIVER_SRC += $(AES4000_SRC)
+libfprint_la_CFLAGS += $(IMAGEMAGICK_CFLAGS) -DENABLE_AES4000
+libfprint_la_LIBADD += $(IMAGEMAGICK_LIBS)
+endif
libfprint_la_SOURCES = \
fp_internal.h \
diff -ur a/libfprint/core.c b/libfprint/core.c
--- a/libfprint/core.c 2008-07-17 14:06:28.000000000 +0200
+++ b/libfprint/core.c 2008-07-17 14:05:37.000000000 +0200
@@ -331,7 +331,9 @@
};
static struct fp_img_driver * const img_drivers[] = {
+#ifdef ENABLE_AES4000
&aes4000_driver,
+#endif
&aes2501_driver,
&uru4000_driver,
&vcom5s_driver,
diff -ur a/libfprint/fp_internal.h b/libfprint/fp_internal.h
--- a/libfprint/fp_internal.h 2008-07-17 14:06:38.000000000 +0200
+++ b/libfprint/fp_internal.h 2008-07-17 14:05:46.000000000 +0200
@@ -239,7 +239,9 @@
extern struct fp_img_driver uru4000_driver;
extern struct fp_img_driver aes1610_driver;
extern struct fp_img_driver aes2501_driver;
+#ifdef ENABLE_AES4000
extern struct fp_img_driver aes4000_driver;
+#endif
extern struct fp_img_driver fdu2000_driver;
extern struct fp_img_driver vcom5s_driver;
diff -ur a/libfprint/imgdev.c b/libfprint/imgdev.c
--- a/libfprint/imgdev.c 2008-07-17 14:06:33.000000000 +0200
+++ b/libfprint/imgdev.c 2008-07-17 14:07:54.000000000 +0200
@@ -20,7 +20,9 @@
#include <errno.h>
#include <glib.h>
+#ifdef ENABLE_AES4000
#include <magick/ImageMagick.h>
+#endif
#include "fp_internal.h"
@@ -86,6 +88,7 @@
return 0;
return imgdrv->change_state(imgdev, state);
}
+#ifdef ENABLE_AES4000
static struct fp_img *im_resize(struct fp_img *img, unsigned int factor)
{
@@ -129,6 +132,7 @@
return newimg;
}
+#endif
/* check image properties and resize it if necessary. potentially returns a new
* image after freeing the old one. */
@@ -156,7 +160,7 @@
fp_err("image is not sane!");
return -EINVAL;
}
-
+#ifdef ENABLE_AES4000
if (imgdrv->enlarge_factor > 1) {
/* FIXME: enlarge_factor should not exist! instead, MINDTCT should
* actually look at the value of the pixels-per-mm parameter and
@@ -166,6 +170,7 @@
fp_img_free(img);
*_img = tmp;
}
+#endif
return 0;
}
_______________________________________________
fprint mailing list
[email protected]
http://lists.reactivated.net/mailman/listinfo/fprint