From 72a5cbadc1498b58bc7873a450de4b50e322a676 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 3 May 2006 09:07:38 +0000 Subject: r15406: Move 'smbreadline' out of libreplace as it doesn't replace functionality not available on some platforms but is a Samba-specific library. (This used to be commit e9d3660fa6678424e5159708a1aa572824926c8e) --- source4/lib/smbreadline/readline.m4 | 81 +++++++++++++++++ source4/lib/smbreadline/smbreadline.c | 164 ++++++++++++++++++++++++++++++++++ source4/lib/smbreadline/smbreadline.h | 9 ++ 3 files changed, 254 insertions(+) create mode 100644 source4/lib/smbreadline/readline.m4 create mode 100644 source4/lib/smbreadline/smbreadline.c create mode 100644 source4/lib/smbreadline/smbreadline.h (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 new file mode 100644 index 0000000000..cff7ece126 --- /dev/null +++ b/source4/lib/smbreadline/readline.m4 @@ -0,0 +1,81 @@ +############################################### +# Readline included by default unless explicitly asked not to +test "${with_readline+set}" != "set" && with_readline=yes + +EXTERNAL_READLINE=no +# test for where we get readline() from +AC_MSG_CHECKING(whether to use readline) +AC_ARG_WITH(readline, +[ --with-readline[=DIR] Look for readline include/libs in DIR (default=auto) ], +[ case "$with_readline" in + yes) + AC_MSG_RESULT(yes) + + AC_CHECK_HEADERS(readline.h history.h readline/readline.h) + AC_CHECK_HEADERS(readline/history.h) + + AC_CHECK_HEADERS(readline.h readline/readline.h,[ + for termlib in ncurses curses termcap terminfo termlib tinfo; do + AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) + done + AC_CHECK_LIB(readline, rl_callback_handler_install, + [TERMLIBS="-lreadline $TERMLIBS" + EXTERNAL_READLINE=yes + break], [TERMLIBS=], $TERMLIBS)]) + ;; + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + + # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at + # alternate readline path + _ldflags=${LDFLAGS} + _cppflags=${CPPFLAGS} + + # Add additional search path + LDFLAGS="-L$with_readline/lib $LDFLAGS" + CPPFLAGS="-I$with_readline/include $CPPFLAGS" + + AC_CHECK_HEADERS(readline.h history.h readline/readline.h) + AC_CHECK_HEADERS(readline/history.h) + + AC_CHECK_HEADERS(readline.h readline/readline.h,[ + for termlib in ncurses curses termcap terminfo termlib; do + AC_CHECK_LIB(${termlib}, tgetent, [TERMLIBS="-l${termlib}"; break]) + done + AC_CHECK_LIB(readline, rl_callback_handler_install, + [TERMLDFLAGS="-L$with_readline/lib" + TERMCPPFLAGS="-I$with_readline/include" + LDFLAGS="-L$with_readline/lib $LDFLAGS" + CPPFLAGS="-I$with_readline/include $CPPFLAGS" + TERMLIBS="-lreadline $TERMLIBS" + EXTERNAL_READLINE=yes + break], [TERMLIBS= CPPFLAGS=$_cppflags], $TERMLIBS)]) + + ;; + esac], + AC_MSG_RESULT(no) +) + +# The readline API changed slightly from readline3 to readline4, so +# code will generate warnings on one of them unless we have a few +# special cases. +AC_CHECK_LIB(readline, rl_completion_matches, + [AC_DEFINE(HAVE_NEW_LIBREADLINE, 1, + [Do we have rl_completion_matches?])], + [], + [$TERMLIBS]) + +AC_MSG_CHECKING(whether to use extern readline) +if test x"$EXTERNAL_READLINE" = x"yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE]) + SMB_EXT_LIB(READLINE, [${TERMLIBS}]) + SMB_ENABLE(READLINE,YES) +else + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], []) + AC_MSG_RESULT(no) +fi diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c new file mode 100644 index 0000000000..78febf5000 --- /dev/null +++ b/source4/lib/smbreadline/smbreadline.c @@ -0,0 +1,164 @@ +/* + Unix SMB/CIFS implementation. + Samba readline wrapper implementation + Copyright (C) Simo Sorce 2001 + Copyright (C) Andrew Tridgell 2001 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" +#include "pstring.h" + +#include +#include "system/readline.h" + +/******************************************************************* + Similar to sys_select() but catch EINTR and continue. + This is what sys_select() used to do in Samba. +********************************************************************/ + +int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval) +{ + int ret; + fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf; + struct timeval tval2, *ptval; + + readfds2 = (readfds ? &readfds_buf : NULL); + writefds2 = (writefds ? &writefds_buf : NULL); + errorfds2 = (errorfds ? &errorfds_buf : NULL); + ptval = (tval ? &tval2 : NULL); + + do { + if (readfds) + readfds_buf = *readfds; + if (writefds) + writefds_buf = *writefds; + if (errorfds) + errorfds_buf = *errorfds; + if (tval) + tval2 = *tval; + + /* We must use select and not sys_select here. If we use + sys_select we'd lose the fact a signal occurred when sys_select + read a byte from the pipe. Fix from Mark Weaver + + */ + + ret = select(maxfd, readfds2, writefds2, errorfds2, ptval); + } while (ret == -1 && errno == EINTR); + + if (readfds) + *readfds = readfds_buf; + if (writefds) + *writefds = writefds_buf; + if (errorfds) + *errorfds = errorfds_buf; + + return ret; +} + +/**************************************************************************** + Display the prompt and wait for input. Call callback() regularly +****************************************************************************/ + +static char *smb_readline_replacement(const char *prompt, void (*callback)(void), + char **(completion_fn)(const char *text, int start, int end)) +{ + fd_set fds; + static pstring line; + struct timeval timeout; + int fd = STDIN_FILENO; + char *ret; + + do_debug("%s", prompt); + + while (1) { + timeout.tv_sec = 5; + timeout.tv_usec = 0; + + FD_ZERO(&fds); + FD_SET(fd,&fds); + + if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) { + ret = x_fgets(line, sizeof(line), x_stdin); + return ret; + } + if (callback) + callback(); + } +} + +/**************************************************************************** + Display the prompt and wait for input. Call callback() regularly. +****************************************************************************/ + +char *smb_readline(const char *prompt, void (*callback)(void), + char **(completion_fn)(const char *text, int start, int end)) +{ +#if HAVE_LIBREADLINE + if (isatty(STDIN_FILENO)) { + char *ret; + + /* Aargh! Readline does bizzare things with the terminal width + that mucks up expect(1). Set CLI_NO_READLINE in the environment + to force readline not to be used. */ + + if (getenv("CLI_NO_READLINE")) + return smb_readline_replacement(prompt, callback, completion_fn); + + if (completion_fn) { + /* The callback prototype has changed slightly between + different versions of Readline, so the same function + works in all of them to date, but we get compiler + warnings in some. */ + rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn; + } + + if (callback) + rl_event_hook = (Function *)callback; + ret = readline(prompt); + if (ret && *ret) + add_history(ret); + return ret; + } else +#endif + return smb_readline_replacement(prompt, callback, completion_fn); +} + +/**************************************************************************** + * return line buffer text + ****************************************************************************/ +const char *smb_readline_get_line_buffer(void) +{ +#if defined(HAVE_LIBREADLINE) + return rl_line_buffer; +#else + return NULL; +#endif +} + +/**************************************************************************** + * set completion append character + ***************************************************************************/ +void smb_readline_ca_char(char c) +{ +#if defined(HAVE_LIBREADLINE) + rl_completion_append_character = c; +#endif +} + + + diff --git a/source4/lib/smbreadline/smbreadline.h b/source4/lib/smbreadline/smbreadline.h new file mode 100644 index 0000000000..cde2b47a24 --- /dev/null +++ b/source4/lib/smbreadline/smbreadline.h @@ -0,0 +1,9 @@ +#ifndef __SMBREADLINE_H__ +#define __SMBREADLINE_H__ + +char *smb_readline(const char *prompt, void (*callback)(void), + char **(completion_fn)(const char *text, int start, int end)); +const char *smb_readline_get_line_buffer(void); +void smb_readline_ca_char(char c); + +#endif /* __SMBREADLINE_H__ */ -- cgit From bf5b0606a53251d47ae220d3771b953d8e4a7b22 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Sep 2006 05:42:23 +0000 Subject: r18134: the lib/replace/system/filesys.h in this patch should be system/filesys.h, but it doesn't work. Metze is looking into it :-) (This used to be commit 0dc0b7ff613d39f93c1680116c04348b720afaff) --- source4/lib/smbreadline/readline.m4 | 4 ++-- source4/lib/smbreadline/smbreadline.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 index cff7ece126..e19f0a1744 100644 --- a/source4/lib/smbreadline/readline.m4 +++ b/source4/lib/smbreadline/readline.m4 @@ -72,10 +72,10 @@ AC_MSG_CHECKING(whether to use extern readline) if test x"$EXTERNAL_READLINE" = x"yes"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE]) + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE LIBREPLACE]) SMB_EXT_LIB(READLINE, [${TERMLIBS}]) SMB_ENABLE(READLINE,YES) else - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], []) + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [LIBREPLACE]) AC_MSG_RESULT(no) fi diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index 78febf5000..3d046f6099 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -21,9 +21,9 @@ #include "includes.h" #include "pstring.h" - -#include -#include "system/readline.h" +#include "lib/replace/system/filesys.h" +#include "lib/replace/system/select.h" +#include "lib/replace/system/readline.h" /******************************************************************* Similar to sys_select() but catch EINTR and continue. -- cgit From ead21647a248b250876ce7d2133bd4a1fe2b2d57 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Sep 2006 07:56:41 +0000 Subject: r18207: not all readline libs have rl_event_hook this should help with coreserverbuild (Mac OS X) (This used to be commit b0efbdfa98cfda87a78874c2a71a52cc091e4021) --- source4/lib/smbreadline/readline.m4 | 3 +++ source4/lib/smbreadline/smbreadline.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 index e19f0a1744..4eebd13b5a 100644 --- a/source4/lib/smbreadline/readline.m4 +++ b/source4/lib/smbreadline/readline.m4 @@ -68,6 +68,9 @@ AC_CHECK_LIB(readline, rl_completion_matches, [], [$TERMLIBS]) +# not all readline libs have rl_event_hook +AC_CHECK_DECLS(rl_event_hook, [], [], [#include ]) + AC_MSG_CHECKING(whether to use extern readline) if test x"$EXTERNAL_READLINE" = x"yes"; then AC_MSG_RESULT(yes) diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index 3d046f6099..6b8e54e1e3 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -127,8 +127,10 @@ char *smb_readline(const char *prompt, void (*callback)(void), rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn; } +#if HAVE_DECL_RL_EVENT_HOOK if (callback) rl_event_hook = (Function *)callback; +#endif ret = readline(prompt); if (ret && *ret) add_history(ret); -- cgit From b04fac4ed3cea2bdc0d0888713c20e0cc1c9d5b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Sep 2006 08:34:12 +0000 Subject: r18208: Mac OS X also doesn't have history_list() must be a pretty old readline lib! (This used to be commit ba901e6820c02bc696c0bd3e9e0788801fd0795b) --- source4/lib/smbreadline/readline.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 index 4eebd13b5a..29f7ac6e1a 100644 --- a/source4/lib/smbreadline/readline.m4 +++ b/source4/lib/smbreadline/readline.m4 @@ -68,8 +68,12 @@ AC_CHECK_LIB(readline, rl_completion_matches, [], [$TERMLIBS]) -# not all readline libs have rl_event_hook +# not all readline libs have rl_event_hook or history_list AC_CHECK_DECLS(rl_event_hook, [], [], [#include ]) +AC_CHECK_LIB(readline, history_list, + [AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])], + [], + [$TERMLIBS]) AC_MSG_CHECKING(whether to use extern readline) if test x"$EXTERNAL_READLINE" = x"yes"; then -- cgit From a46e12d0e07e1630f8ef15aff0f97cb2f1f4c273 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 7 Sep 2006 10:02:32 +0000 Subject: r18213: don't list LIBREPLACE depdendecies explicit and always at it as first private dependencies metze (This used to be commit 135d096776b53ae09ffc2b4f767dfbd18139570f) --- source4/lib/smbreadline/readline.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 index 29f7ac6e1a..ab85bba438 100644 --- a/source4/lib/smbreadline/readline.m4 +++ b/source4/lib/smbreadline/readline.m4 @@ -79,10 +79,10 @@ AC_MSG_CHECKING(whether to use extern readline) if test x"$EXTERNAL_READLINE" = x"yes"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE LIBREPLACE]) + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE]) SMB_EXT_LIB(READLINE, [${TERMLIBS}]) SMB_ENABLE(READLINE,YES) else - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [LIBREPLACE]) + SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], []) AC_MSG_RESULT(no) fi -- cgit From e7f2d247e40218ce3320e288780ad745bc38f6a2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Sep 2006 02:32:12 +0000 Subject: r18281: a workaround for an infinite dependency loop in the dependency generation for smbreadline.d. The problem was caused by extra_flags.txt having ./lib/smbreadline/smbreadline.o but the build using lib/smbreadline/smbreadline.o, which means cflags.pl didn't match the target. Hopefully the workaround can be removed when metze or jelmer wake up and give me a hint on how to make SMB_SUBSYSTEM() not add the ./ prefix :-) (This used to be commit 826cd304a7cf54ab60ea41b6ecf00ca7b89f2b39) --- source4/lib/smbreadline/smbreadline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index 6b8e54e1e3..a1fa5d7df3 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -21,9 +21,9 @@ #include "includes.h" #include "pstring.h" -#include "lib/replace/system/filesys.h" -#include "lib/replace/system/select.h" -#include "lib/replace/system/readline.h" +#include "system/filesys.h" +#include "system/select.h" +#include "system/readline.h" /******************************************************************* Similar to sys_select() but catch EINTR and continue. -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/lib/smbreadline/smbreadline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index a1fa5d7df3..ae9fc4a3b7 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -6,7 +6,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,8 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From dccf3f99e45137b6cd18c1de1c79808ad67130d1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 13:27:14 +0000 Subject: r25027: Fix more warnings. (This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729) --- source4/lib/smbreadline/smbreadline.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index ae9fc4a3b7..2a72750efb 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -23,6 +23,7 @@ #include "system/filesys.h" #include "system/select.h" #include "system/readline.h" +#include "lib/smbreadline/smbreadline.h" /******************************************************************* Similar to sys_select() but catch EINTR and continue. -- cgit From d8feba9faf8f135109e347b5bf5fa054df97a11a Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 14 Dec 2007 10:46:35 +0100 Subject: r26452: Janitorial: Remove a pstring. (This used to be commit d1d95024788bc549f838c0393411fa98ddec04ec) --- source4/lib/smbreadline/smbreadline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index 2a72750efb..e5cc3522e9 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -19,7 +19,6 @@ */ #include "includes.h" -#include "pstring.h" #include "system/filesys.h" #include "system/select.h" #include "system/readline.h" @@ -78,7 +77,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) char **(completion_fn)(const char *text, int start, int end)) { fd_set fds; - static pstring line; + static char line[1024]; struct timeval timeout; int fd = STDIN_FILENO; char *ret; @@ -91,7 +90,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) FD_ZERO(&fds); FD_SET(fd,&fds); - + if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) { ret = x_fgets(line, sizeof(line), x_stdin); return ret; -- cgit From 43ac3d9b44b98d44db9b1550c47e8f96a410d1e9 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 14 Dec 2007 14:04:56 +0100 Subject: r26453: Janitorial: Don't use a static char[] in smb_readline_replacement. Fix up callers to free the memory returned, as that is needed if we use the original readline function as well. (This used to be commit c81ead1c38f417d442157b21d0d389f6a540c6f9) --- source4/lib/smbreadline/smbreadline.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/smbreadline.c b/source4/lib/smbreadline/smbreadline.c index e5cc3522e9..a85f335b8a 100644 --- a/source4/lib/smbreadline/smbreadline.c +++ b/source4/lib/smbreadline/smbreadline.c @@ -77,13 +77,18 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) char **(completion_fn)(const char *text, int start, int end)) { fd_set fds; - static char line[1024]; + char *line; struct timeval timeout; int fd = STDIN_FILENO; char *ret; do_debug("%s", prompt); + line = (char *)malloc(BUFSIZ); + if (!line) { + return NULL; + } + while (1) { timeout.tv_sec = 5; timeout.tv_usec = 0; @@ -92,7 +97,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) FD_SET(fd,&fds); if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) { - ret = x_fgets(line, sizeof(line), x_stdin); + ret = x_fgets(line, BUFSIZ, x_stdin); return ret; } if (callback) -- cgit From 42cfbe272c0a4f1131d28f1de9121063869be2a3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 May 2008 19:35:04 +0200 Subject: Add variable for smbreadline directory. (This used to be commit 94167c7d4273fbd6084d6ddae7fd15dcb189d62f) --- source4/lib/smbreadline/readline.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/smbreadline') diff --git a/source4/lib/smbreadline/readline.m4 b/source4/lib/smbreadline/readline.m4 index ab85bba438..ad6bc66690 100644 --- a/source4/lib/smbreadline/readline.m4 +++ b/source4/lib/smbreadline/readline.m4 @@ -79,10 +79,10 @@ AC_MSG_CHECKING(whether to use extern readline) if test x"$EXTERNAL_READLINE" = x"yes"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], [READLINE]) + SMB_SUBSYSTEM(SMBREADLINE, [\$(smbreadlinesrcdir)/smbreadline.o], [READLINE]) SMB_EXT_LIB(READLINE, [${TERMLIBS}]) SMB_ENABLE(READLINE,YES) else - SMB_SUBSYSTEM(SMBREADLINE, [lib/smbreadline/smbreadline.o], []) + SMB_SUBSYSTEM(SMBREADLINE, [\$(smbreadlinesrcdir)/smbreadline.o], []) AC_MSG_RESULT(no) fi -- cgit