--- files/patch-configure.orig Wed Jan 12 23:02:39 2005 +++ files/patch-configure Wed Jan 12 23:15:30 2005 @@ -1,5 +1,5 @@ ---- configure.orig Fri Sep 3 14:08:03 2004 -+++ configure Fri Sep 3 14:14:34 2004 +--- configure.orig Tue Dec 28 05:45:03 2004 ++++ configure Wed Jan 12 23:15:17 2005 @@ -43,8 +43,8 @@ DIR_LIB=/usr/local/lib DIR_LIBEXEC=$DIR_SBIN @@ -29,81 +29,16 @@ -target|--target) ac_prev=TARGET;; -target=*|--target=*) TARGET="$ac_optarg" ;; - -disable-pam|--disable-pam) DISABLE_PAM="yes" ;; -+ -disable-pam|--disable-pam) DISABLE_PAM="yes" ;; ++ -disable-pam|--disable-pam) DISABLE_PAM="yes" ;; -version|--version) - echo "This is HylaFAX configure $Revision: 1.102 $" + echo "This is HylaFAX configure $Revision: 1.106 $" exit 0 -@@ -1519,10 +1519,16 @@ - # - CheckForLibrary() - { -+ incls=$1; shift -+ vars=$1; shift - f=$1; shift - libs="$@"; -- cat>t.c<t.c -+ for i in $incls; do -+ echo "#include "$i>>t.c -+ done -+ cat>>t.c<" "char *a,*b;" "iopen(a,b)" -limage && CheckForIncludeFile gl/image.h; then - Note "Looks like there is support for SGI RGB images, configuring sgi2fax." - SGI2FAX=yes - else - SGI2FAX=no - fi - fi --if [ "$LIBMALLOC" = auto ]; then -- if CheckForLibrary mallopt -lmalloc; then -- Note "Looks like -lmalloc is here, using it for memory allocation." -- LIBMALLOC=yes -- else -+### FreeBSD have malloc in -lc, which is checked elsewhere. -+#if [ "$LIBMALLOC" = auto ]; then -+# if CheckForLibrary mallopt -lmalloc; then -+# Note "Looks like -lmalloc is here, using it for memory allocation." -+# LIBMALLOC=yes -+# else - LIBMALLOC=no -- fi --fi --if [ "$LIBSUN" = auto ]; then -- if CheckForLibrary getpwnam -lsun; then -- Note "Looks like -lsun is here, using it for NIS passwd & group stuff." -- LIBSUN=yes -- else -+# fi -+#fi -+### FreeBSD have getpwnam in -lc, which is checked elsewhere. -+#if [ "$LIBSUN" = auto ]; then -+# if CheckForLibrary getpwnam -lsun; then -+# Note "Looks like -lsun is here, using it for NIS passwd & group stuff." -+# LIBSUN=yes -+# else - LIBSUN=no -- fi --fi -+# fi -+#fi - HAVE_PAM="/*#define HAVE_PAM 1*/" - PAMLIBS="" +@@ -1578,11 +1578,11 @@ if [ "$DISABLE_PAM" != "yes" ]; then Note "Checking for PAM (Pluggable Authentication Module) support" -- CheckForLibrary pam_authenticate -lpam && + CheckForLibrary pam_authenticate -lpam && - CheckForLibrary misc_conv -lpam_misc -lpam && -+ CheckForLibrary " " "pam_handle_t *a; int b;" "pam_authenticate(a,b)" -lpam && -+ CheckForLibrary "" "int a; const struct pam_message **b; struct pam_response **c; void *d;" "misc_conv(a,b,c,d)" -lpam && ++ CheckForLibrary misc_conv -lpam && CheckForIncludeFile security/pam_appl.h && CheckForIncludeFile security/pam_misc.h && { HAVE_PAM="#define HAVE_PAM 1" @@ -112,184 +47,7 @@ } if [ "x$PAMLIBS" = "x" ]; then Note "... not found. Disabling PAM support" -@@ -1584,25 +1592,25 @@ - else - Note "Disabling PAM support" - fi --CheckForLibrary crypt -lc || { -+CheckForLibrary "" "const char *a,*b;" "crypt(a,b)" -lc || { - # - # FreeBSD-2.1 in particular needs -lcrypt. - # SCO sometime has -lcrypt_d (domestic) and - # sometimes -lcrypt_i (import?) - # - for i in -lcrypt -lcrypt_d -lcrypt_i; do -- if CheckForLibrary crypt $i; then -+ if CheckForLibrary "" "" "crypt()" $i; then - Note "Looks like $i is needed for crypt." - MACHDEPLIBS="$MACHDEPLIBS $i" - break; - fi - done - } --CheckForLibrary strftime -lc || { -+CheckForLibrary " " "char *a; size_t b; const char *c; const struct tm *d;" "strftime(a,b,c,d)" -lc || { - # - # SCO has strftime in -lintl. - # -- if CheckForLibrary strftime -lintl; then -+ if CheckForLibrary "" "" "strftime()" -lintl; then - Note "Looks like -lintl is needed for strftime." - MACHDEPLIBS="$MACHDEPLIBS -lintl" - else -@@ -1620,18 +1628,18 @@ - boom - fi - } --CheckForLibrary socket -lc || { -+CheckForLibrary " " "int a,b,c;" "socket(a,b,c)" -lc || { - # - # Socket support is not in normal C library, check - # for SVR4-style networking w/ -lsocket & -lnsl - # -- if CheckForLibrary socket -lsocket -lnsl; then -+ if CheckForLibrary "" "" "socket()" -lsocket -lnsl; then - Note "Looks like -lsocket & -lnsl are needed for socket support." - MACHDEPLIBS="$MACHDEPLIBS -lsocket -lnsl" -- elif CheckForLibrary socket -linet -lnsl_s; then -+ elif CheckForLibrary "" "" "socket()" -linet -lnsl_s; then - Note "Looks like -linet & -lnsl_s are needed for socket support." - MACHDEPLIBS="$MACHDEPLIBS -linet -lnsl_s" -- elif CheckForLibrary socket -lsocket; then -+ elif CheckForLibrary "" "" "socket()" -lsocket; then - Note "Looks like -lsocket is needed for socket support." - MACHDEPLIBS="$MACHDEPLIBS -lsocket" - else -@@ -1650,39 +1658,43 @@ - boom - fi - } --if CheckForLibrary logwtmp -lutil; then -+if CheckForLibrary " " "const char *a,*b,*c;" "logwtmp(a,b,c)" -lutil; then - Note "Looks like -lutil is needed for wtmp file logging." - MACHDEPLIBS="$MACHDEPLIBS -lutil" - HAS_LOGWTMP=yes - else - HAS_LOGWTMP=no - fi --CheckForLibrary ftruncate -lc || { -- CheckForLibrary chsize -lx && { -+CheckForLibrary "" "int a; off_t b;" "ftruncate(a,b)" -lc || { -+ CheckForLibrary "" "" "chsize()" -lx && { - Note "Looks like -lx is needed for chsize (used to emulate ftruncate)." - MACHDEPLIBS="$MACHDEPLIBS -lx" - } - } --CheckForLibrary flock -lc || { -- CheckForLibrary flock -lbsd && { -+CheckForLibrary "" "int a,b;" "flock(a,b)" -lc || { -+ CheckForLibrary "" "" "flock()" -lbsd && { - Note "Looks like -lbsd is needed for flock." - MACHDEPLIBS="$MACHDEPLIBS -lbsd" - } - } --for f in openlog pututxline; do -- CheckForLibrary $f -lc || { -- CheckForLibrary $f -lgen && { -- Note "Looks like -lgen is needed for $f." -- MACHDEPLIBS="$MACHDEPLIBS -lgen" -- break; -- } -+CheckForLibrary " " "const char *a; int b,c;" "openlog(a,b,c)" -lc || { -+ CheckForLibrary "" "" "openlog()" -lgen && { -+ Note "Looks like -lgen is needed for openlog." -+ MACHDEPLIBS="$MACHDEPLIBS -lgen" - } --done -+} -+### FreeBSD do not have pututxline. -+#CheckForLibrary pututxline -lc || { -+# CheckForLibrary pututxline -lgen && { -+# Note "Looks like -lgen is needed for pututxline." -+# MACHDEPLIBS="$MACHDEPLIBS -lgen" -+# } -+#} - if [ "$ISGXX" = yes ]; then - if [ -z "$CXXRUNTIME" ]; then -- for f in memmove strdup; do -- CheckForLibrary $f -lc || { -- CheckForLibrary $f -lg++ && { -+ for f in "memmove(a,b,c)" "strdup(d)"; do -+ CheckForLibrary "" "void *a; const void *b; size_t c; const char *d;" $f -lc || { -+ CheckForLibrary "" "" "$f()" -lg++ && { - Note "Looks like we need -lg++ for $f" - MACHDEPLIBS="$MACHDEPLIBS -lg++" - break; -@@ -1690,9 +1702,9 @@ - } - done - fi -- for f in strtoul strerror memmove random; do -- CheckForLibrary $f -lc || { -- CheckForLibrary $f -liberty && { -+ for f in "strtoul(a,b,c)" "strerror(c)" "memmove(d,e,f)" "random()"; do -+ CheckForLibrary " " "const char *a; char **b; int c; void *d; const void *e; size_t f;" $f -lc || { -+ CheckForLibrary "" "" "$f()" -liberty && { - Note "Looks like we need -liberty for $f" - MACHDEPLIBS="$MACHDEPLIBS -liberty" - break; -@@ -1700,12 +1712,12 @@ - } - done - fi --CheckForLibrary floor -lm && { -+CheckForLibrary "" "double a;" "floor(a)" -lm && { - Note "Looks like -lm is the library for math functions." - MACHDEPLIBS="$MACHDEPLIBS -lm" - } - MACHDEPLIBS="$MACHDEPLIBS $CXXRUNTIME" --test "$LIBSUN" = yes && MACHDEPLIBS="$MACHDEPLIBS -lsun" -+test "$LIBSUN" = yes && MACHDEPLIBS="$MACHDEPLIBS -lc" - test "$LIBMALLOC" = yes && MACHDEPLIBS="$MACHDEPLIBS -lmalloc" - - # -@@ -2364,5 +2364,5 @@ - if [ "${lib_ver}" = "3.4" ]; then - tiff_runlen_t="uint16" -- elif [ "${lib_ver}" = "3.5" -o "${lib_ver}" = "3.6" ]; then -+ elif [ "${lib_ver}" = "3.5" -o "${lib_ver}" = "3.6" -o "${lib_ver}" = "3.7" ]; then - tiff_runlen_t="uint32" - fi -@@ -2401,7 +2401,7 @@ - Incompatible TIFF Library. - --HylaFAX ${VERSION} requires TIFF software distribution ver 3.4, 3.5, or --3.6. If you do not have up to date TIFF software on your system then --you can retrieve it from the location where you obtained this software. -+HylaFAX ${VERSION} requires TIFF software distribution ver 3.4, 3.5, -+3.6, or 3.7. If you do not have up to date TIFF software on your system -+then you can retrieve it from the location where you obtained this software. - The Home Page for version 3.5 and later is http://www.libtiff.org - EOF -@@ -2640,7 +2652,7 @@ - } - CheckFuncDecl unlink 'extern int unlink(const char*);' unistd.h - CheckFuncDecl read 'extern int read(int, const void*, unsigned int);' unistd.h -- CheckFuncDecl ioctl 'extern int ioctl(int, int, ...);' unistd.h sys/ioctl.h -+ CheckFuncDecl ioctl 'extern int ioctl(int, unsigned long, ...);' sys/ioccom.h - CheckForFunc fchown && { - echo '#define HAS_FCHOWN 1' - Note "... configure use of fchown" -@@ -2852,7 +2864,7 @@ - AddFuncDecl logwtmp \ - 'int logwtmp(const char*, const char*, const char*);' - } -- CheckForLibrary logout -lutil && { -+ CheckForLibrary " " "const char *a;" "logout(a)" -lutil && { - echo '#define HAS_LOGOUT 1' - Note "... configure use of logout (BSD-style utmp support)" - CheckForFuncDecl logout utmp.h || { -@@ -4307,18 +4319,8 @@ +@@ -4326,18 +4326,8 @@ HylaFAX configuration parameters (part 1 of 2) are: @@ -308,7 +66,7 @@ [13] Default page size: $PAGESIZE [14] Default vertical res (lpi): $DEFVRES -@@ -4334,16 +4336,9 @@ +@@ -4353,16 +4343,11 @@ [15] Location of getty program: $PATH_GETTY [16] Location of voice getty program: $PATH_VGETTY [17] Location of sendmail program: $PATH_SENDMAIL @@ -318,17 +76,15 @@ -[21] Location of SysV stop scripts: $DIR_SYSVINITSTOP -[22] Name of SysV start script: $NAME_SYSVINITSTART -[23] Name of SysV stop script: $NAME_SYSVINITSTOP --[24] Init script starts faxq: $FAXQ_SERVER --[25] Init script starts hfaxd $HFAXD_SERVER --[26] Start old protocol: $HFAXD_OLD_PROTOCOL --[27] Start paging protocol: $HFAXD_SNPP_SERVER -+[26] Use old protocol: $HFAXD_OLD_PROTOCOL -+[27] Use paging protocol: $HFAXD_SNPP_SERVER + [24] Init script starts faxq: $FAXQ_SERVER + [25] Init script starts hfaxd $HFAXD_SERVER + [26] Start old protocol: $HFAXD_OLD_PROTOCOL + [27] Start paging protocol: $HFAXD_SNPP_SERVER + EOF } -@@ -4444,7 +4439,7 @@ +@@ -4463,7 +4448,7 @@ ok=skip while [ "$ok" != y ] && [ "$ok" != yes ]; do if [ "$ok" != skip ]; then @@ -337,12 +93,12 @@ promptForParameter $i; done fi -@@ -4473,7 +4468,7 @@ +@@ -4492,7 +4477,7 @@ ok=skip while [ "$ok" != y ] && [ "$ok" != yes ]; do if [ "$ok" != skip ]; then - for i in 15 16 17 18 19 20 21 22 23 24 25 26 27 ; do -+ for i in 15 16 17 26 27 ; do ++ for i in 15 16 17 24 25 26 27 ; do promptForParameter $i; done fi