summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexey Gladkov <legion@altlinux.org>2006-05-23 20:52:23 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-05-23 20:52:23 +1000
commit13537aaa484b1f3ea914c0dc4f71070602003880 (patch)
treea740c8a5411caa871804562f89b66f1885626d4f /configure.ac
parent[PARSER] Only use signed char for syntax arrays (diff)
downloaddash-13537aaa484b1f3ea914c0dc4f71070602003880.tar.gz
dash-13537aaa484b1f3ea914c0dc4f71070602003880.zip
[BUILD] Added --with-libedit option to configure
Add to the configure.ac new option:
--with-libedit - Compile with libedit support.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9bd021b..01cac17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,5 +42,18 @@ AC_CHECK_FUNC(stat64,, [
 	AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit])
 ])
 
+AC_ARG_WITH(libedit, AS_HELP_STRING(--with-libedit, [Compile with libedit support]))
+use_libedit=
+if test "$with_libedit" = "yes"; then
+	AC_CHECK_LIB(edit, history_init, [
+		AC_CHECK_HEADER([histedit.h], [use_libedit="yes"],
+				AC_MSG_ERROR(
+					[Can't find required header files.]))])
+fi
+if test "$use_libedit" != "yes"; then
+	AC_DEFINE([SMALL], 1, [Define if you build with -DSMALL])
+else
+	export LIBS="$LIBS -ledit"
+fi
 AC_CONFIG_FILES([Makefile src/Makefile])
 AC_OUTPUT