Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Dev

[PATCH] Fix libedit detection on *BSD OS's

 

 

Varnish dev RSS feed   Index | Next | Previous | View Threaded


brad at comstyle

Jan 2, 2012, 11:03 AM

Post #1 of 7 (613 views)
Permalink
[PATCH] Fix libedit detection on *BSD OS's

The following patch allows the autoconf script to detect the presence of
libedit when there isn't a pkg-config file present and thus allowing
Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.

diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index bb5cc8e..90532a8 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -33,8 +33,12 @@

#ifdef HAVE_LIBEDIT
#include <stdio.h>
+#ifdef HAVE_READLINE_READLINE_H
+#include <readline/readline.h>
+#else
#include <editline/readline.h>
#endif
+#endif

#include <errno.h>
#include <fcntl.h>
diff --git a/configure.ac b/configure.ac
index 01eac28..7d33c32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,9 +142,16 @@ fi
AC_SUBST(PCRE_CFLAGS)
AC_SUBST(PCRE_LIBS)

-PKG_CHECK_MODULES([LIBEDIT], [libedit],
+PKG_CHECK_MODULES([LIBEDIT], [libedit],
[AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])],
- [AC_MSG_WARN([libedit not found, disabling libedit support])])
+ [AC_CHECK_HEADERS([readline/readline.h])
+ AC_CHECK_LIB(edit, el_init,
+ [ AC_DEFINE([HAVE_LIBEDIT], [1], [Define we have libedit])
+ LIBEDIT_CFLAGS=""
+ LIBEDIT_LIBS="-ledit ${CURSES_LIBS}"
+ ],
+ [AC_MSG_WARN([libedit not found, disabling libedit support])],
+ [${CURSES_LIBS}])])

# Checks for header files.
AC_HEADER_STDC

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


brad at comstyle

Jan 15, 2012, 2:11 PM

Post #2 of 7 (562 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

On 02/01/12 2:03 PM, Brad wrote:
> The following patch allows the autoconf script to detect the presence of
> libedit when there isn't a pkg-config file present and thus allowing
> Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.

ping.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


brad at comstyle

Mar 20, 2012, 6:51 PM

Post #3 of 7 (502 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

On 15/01/12 5:11 PM, Brad wrote:
> On 02/01/12 2:03 PM, Brad wrote:
>> The following patch allows the autoconf script to detect the presence of
>> libedit when there isn't a pkg-config file present and thus allowing
>> Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
>
> ping.

ping ping.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


brad at comstyle

Apr 25, 2012, 11:13 PM

Post #4 of 7 (447 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

On 02/01/12 2:03 PM, Brad wrote:
> The following patch allows the autoconf script to detect the presence of
> libedit when there isn't a pkg-config file present and thus allowing
> Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
>
> diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
> index bb5cc8e..90532a8 100644
> --- a/bin/varnishadm/varnishadm.c
> +++ b/bin/varnishadm/varnishadm.c
> @@ -33,8 +33,12 @@
>
> #ifdef HAVE_LIBEDIT
> #include<stdio.h>
> +#ifdef HAVE_READLINE_READLINE_H
> +#include<readline/readline.h>
> +#else
> #include<editline/readline.h>
> #endif
> +#endif
>
> #include<errno.h>
> #include<fcntl.h>

This part of the diff was not commited and the tree is broken
at the moment.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


brad at comstyle

Apr 26, 2012, 12:01 AM

Post #5 of 7 (460 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

On Thu, Apr 26, 2012 at 02:13:40AM -0400, Brad Smith wrote:
> On 02/01/12 2:03 PM, Brad wrote:
> >The following patch allows the autoconf script to detect the presence of
> >libedit when there isn't a pkg-config file present and thus allowing
> >Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
> >
> >diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
> >index bb5cc8e..90532a8 100644
> >--- a/bin/varnishadm/varnishadm.c
> >+++ b/bin/varnishadm/varnishadm.c
> >@@ -33,8 +33,12 @@
> >
> > #ifdef HAVE_LIBEDIT
> > #include<stdio.h>
> >+#ifdef HAVE_READLINE_READLINE_H
> >+#include<readline/readline.h>
> >+#else
> > #include<editline/readline.h>
> > #endif
> >+#endif
> >
> > #include<errno.h>
> > #include<fcntl.h>
>
> This part of the diff was not commited and the tree is broken
> at the moment.

Here is an updated diff to fix the build on OpenBSD/NetBSD/DragonFly.


diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index f3b8b69..aff9336 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -35,6 +35,8 @@
# include <stdio.h>
# ifdef HAVE_EDIT_READLINE_READLINE_H
# include <edit/readline/readline.h>
+# elif HAVE_READLINE_READLINE_H
+# include <readline/readline.h>
# else
# include <editline/readline.h>
# endif

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


phk at phk

Apr 26, 2012, 9:10 AM

Post #6 of 7 (456 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

In message <20120426070128.GA26996 [at] rox>, Brad Smith writes:

Thanks, committed.

>On Thu, Apr 26, 2012 at 02:13:40AM -0400, Brad Smith wrote:
>> On 02/01/12 2:03 PM, Brad wrote:
>> >The following patch allows the autoconf script to detect the presence of
>> >libedit when there isn't a pkg-config file present and thus allowing
>> >Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
>> >
>> >diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
>> >index bb5cc8e..90532a8 100644
>> >--- a/bin/varnishadm/varnishadm.c
>> >+++ b/bin/varnishadm/varnishadm.c
>> >@@ -33,8 +33,12 @@
>> >
>> > #ifdef HAVE_LIBEDIT
>> > #include<stdio.h>
>> >+#ifdef HAVE_READLINE_READLINE_H
>> >+#include<readline/readline.h>
>> >+#else
>> > #include<editline/readline.h>
>> > #endif
>> >+#endif
>> >
>> > #include<errno.h>
>> > #include<fcntl.h>
>>
>> This part of the diff was not commited and the tree is broken
>> at the moment.
>
>Here is an updated diff to fix the build on OpenBSD/NetBSD/DragonFly.
>
>
>diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
>index f3b8b69..aff9336 100644
>--- a/bin/varnishadm/varnishadm.c
>+++ b/bin/varnishadm/varnishadm.c
>@@ -35,6 +35,8 @@
> # include <stdio.h>
> # ifdef HAVE_EDIT_READLINE_READLINE_H
> # include <edit/readline/readline.h>
>+# elif HAVE_READLINE_READLINE_H
>+# include <readline/readline.h>
> # else
> # include <editline/readline.h>
> # endif
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>
>
>_______________________________________________
>varnish-dev mailing list
>varnish-dev [at] varnish-cache
>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk [at] FreeBSD | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


brad at comstyle

Apr 26, 2012, 11:38 AM

Post #7 of 7 (451 views)
Permalink
Re: [PATCH] Fix libedit detection on *BSD OS's [In reply to]

On 26/04/12 12:10 PM, Poul-Henning Kamp wrote:
> In message<20120426070128.GA26996 [at] rox>, Brad Smith writes:
>
> Thanks, committed.

Thank you.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


_______________________________________________
varnish-dev mailing list
varnish-dev [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Varnish dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.