--- Makefile.orig	2003-08-07 15:40:39 UTC
+++ Makefile
@@ -44,10 +44,12 @@ APG_CLIBS += -lcrypt
 # If you want to use cracklib for password quality check then you
 # must uncomment the folowing 4 lines (you must not do this for WIN32)
 #
-#CRACKLIB_DICTPATH = "/usr/local/lib/pw_dict"
-#STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
-#CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
-#APG_CLIBS += -lcrack
+.if defined(WITH_CRACKLIB)
+CRACKLIB_DICTPATH = "${LOCALBASE}/libdata/cracklib/cracklib-words"
+STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I${LOCALBASE}/include -L${LOCALBASE}/lib
+CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I${LOCALBASE}/include -L${LOCALBASE}/lib
+APG_CLIBS += -lcrack
+.endif
 
 ##################################################################
 # Support for ANSI X9.17/SHA1 PRNG
@@ -60,12 +62,12 @@ APG_CLIBS += -lcrypt
 ##################################################################
 # You can modify CC variable if you have compiler other than GCC
 # But the code was designed and tested with GCC
-CC = gcc
+CC ?= gcc
 
 ##################################################################
 # Compilation flags
 # You should comment the line below for AIX+native cc
-CFLAGS = -Wall
+CFLAGS ?= -Wall
 
 ####################################################################
 # If you plan to install APG daemon you should look at lines below #
@@ -135,7 +137,7 @@ apgd:
 	${CC} ${CFLAGS} -DCLISERV ${CLISERV_OPTIONS} -o ${CS_PROGNAME} ${SOURCES} ${APG_CS_CLIBS}
 
 apgbfm:
-	${CC} ${FLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
+	${CC} ${CFLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
 
 strip:
 	strip ${PROGNAME}
