Link with -levent if detected, fix examples.

This commit is contained in:
W.C.A. Wijngaards 2013-12-02 14:20:03 +01:00
parent 64c057b82d
commit 997fbec46f
5 changed files with 15 additions and 5 deletions

View File

@ -30,7 +30,7 @@ VPATH = @srcdir@
CC=gcc
CFLAGS=@CFLAGS@ -Wall -fPIC -I$(srcdir)/ -I/usr/local/include -std=c99
LDFLAGS=@LDFLAGS@ -levent_core -lldns -lunbound -lidn
LDFLAGS=@LDFLAGS@ @LIBS@
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
hostname.lo service.lo request-internal.lo validate_dnssec.lo \
util-internal.lo getdns_error.lo

View File

@ -18,7 +18,7 @@ VPATH = @srcdir@
CC=gcc
CFLAGS=@CFLAGS@ -Wall -g -fPIC -I$(srcdir)/ -I$(srcdir)/../ -I/usr/local/include -std=c99
LDFLAGS=@LDFLAGS@ -L. -L.. -L/usr/local/lib
LDLIBS=-lgetdns -lldns -levent_core -lunbound
LDLIBS=-lgetdns @LIBS@
PROGRAMS=example_simple_answers example_tree example_all_functions example_synchronous
.SUFFIXES: .c .o .a .lo .h

View File

@ -26,13 +26,18 @@
* THE SOFTWARE.
*/
#include "../config.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <getdns/getdns.h>
#include <event2/event.h>
#ifdef HAVE_EVENT2_EVENT_H
# include <event2/event.h>
#else
# include <event.h>
#endif
#define UNUSED_PARAM(x) ((void)(x))

View File

@ -1,10 +1,15 @@
#include "../config.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <getdns/getdns.h>
#include <event2/event.h>
#ifdef HAVE_EVENT2_EVENT_H
# include <event2/event.h>
#else
# include <event.h>
#endif
#define UNUSED_PARAM(x) ((void)(x))

View File

@ -18,7 +18,7 @@ VPATH = @srcdir@
CC=gcc
CFLAGS=@CFLAGS@ -Wall -g -fPIC -I$(srcdir)/ -I$(srcdir)/../ -I/usr/local/include -std=c99 $(cflags)
LDFLAGS=@LDFLAGS@ -L. -L.. -L/usr/local/lib
LDLIBS=-lgetdns -lldns -levent_core -lunbound
LDLIBS=-lgetdns @LIBS@
PROGRAMS=tests_dict tests_list tests_stub_async tests_stub_sync
.SUFFIXES: .c .o .a .lo .h