summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-13 06:57:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-13 06:57:04 -0800
commitd1d529634ca0efabd8def4d1e4d103facb9f9380 (patch)
treeb78b2ac15b30f1b62b9de6303c5eff2a74a64dab /configure
parentdbc666fb0822e3bc0fd97d90e068f104ea4f5781 (diff)
downloadtxr-d1d529634ca0efabd8def4d1e4d103facb9f9380.tar.gz
txr-d1d529634ca0efabd8def4d1e4d103facb9f9380.tar.bz2
txr-d1d529634ca0efabd8def4d1e4d103facb9f9380.zip
Support crypt function.
* configure: Check for availability of crypt, and what library must be used. * sysif.c (crypt_wrap): New static function. (sysif_init): Register crypt intrinsic. * txr.1: Documented crypt.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure b/configure
index 1122cc15..b4042c9e 100755
--- a/configure
+++ b/configure
@@ -2235,6 +2235,33 @@ int main(void)
fi
fi
+printf "Checking for crypt ... "
+
+cat > conftest.c <<!
+#include <unistd.h>
+
+int main(void)
+{
+ char *c = crypt("foo", "bar");
+ return 0;
+}
+!
+
+for try_lcrypt in "" "-lcrypt" "no" ; do
+ if [ "$try_lcrypt" = "no" ] ; then
+ printf "no\n"
+ break
+ fi
+ if conftest EXTRA_LDFLAGS=$try_lcrypt; then
+ printf "yes\n"
+ printf "#define HAVE_CRYPT 1\n" >> $config_h
+ if [ -n "$try_lcrypt" ] ; then
+ conf_ldflags="${conf_ldflags:+"$conf_ldflags "}-lcrypt"
+ fi
+ break;
+ fi
+done
+
printf "Checking for alloca ... "
for try_header in alloca.h malloc.h ; do