mirror of https://github.com/getdnsapi/getdns.git
Add Werror to cflags. Remove getdns lib check. Fail configure on dependencies not found.
This commit is contained in:
parent
8b60254fe4
commit
b3e2aa19f3
|
@ -12058,6 +12058,9 @@ fi
|
|||
|
||||
|
||||
# Checks for libraries.
|
||||
found_all_libs=1
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Checking for dependencies ldns and libevent" >&5
|
||||
$as_echo "$as_me: Checking for dependencies ldns and libevent" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for event_base_new in -levent_core" >&5
|
||||
$as_echo_n "checking for event_base_new in -levent_core... " >&6; }
|
||||
if ${ac_cv_lib_event_core_event_base_new+:} false; then :
|
||||
|
@ -12101,51 +12104,8 @@ _ACEOF
|
|||
|
||||
LIBS="-levent_core $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getdns_context_create in -lgetdns" >&5
|
||||
$as_echo_n "checking for getdns_context_create in -lgetdns... " >&6; }
|
||||
if ${ac_cv_lib_getdns_getdns_context_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lgetdns $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char getdns_context_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return getdns_context_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_getdns_getdns_context_create=yes
|
||||
else
|
||||
ac_cv_lib_getdns_getdns_context_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getdns_getdns_context_create" >&5
|
||||
$as_echo "$ac_cv_lib_getdns_getdns_context_create" >&6; }
|
||||
if test "x$ac_cv_lib_getdns_getdns_context_create" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGETDNS 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lgetdns $LIBS"
|
||||
|
||||
found_all_libs=0
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns_dname_new_frm_str in -lldns" >&5
|
||||
|
@ -12191,9 +12151,16 @@ _ACEOF
|
|||
|
||||
LIBS="-lldns $LIBS"
|
||||
|
||||
else
|
||||
found_all_libs=0
|
||||
fi
|
||||
|
||||
|
||||
if test $found_all_libs == 0
|
||||
then
|
||||
as_fn_error $? "One more dependencies is missing" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
for ac_header in inttypes.h netinet/in.h stdint.h stdlib.h string.h
|
||||
do :
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -16,9 +16,15 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||
AC_PROG_CC
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([event_core], [event_base_new])
|
||||
AC_CHECK_LIB([getdns], [getdns_context_create])
|
||||
AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str])
|
||||
found_all_libs=1
|
||||
AC_MSG_NOTICE([Checking for dependencies ldns and libevent])
|
||||
AC_CHECK_LIB([event_core], [event_base_new], [], [found_all_libs=0])
|
||||
AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str], [], [found_all_libs=0])
|
||||
|
||||
if test $found_all_libs == 0
|
||||
then
|
||||
AC_MSG_ERROR([One more dependencies is missing])
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||
AM_CPPFLAGS = -Wall -Werror -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||
lib_LTLIBRARIES = libgetdns.la
|
||||
libgetdns_la_SOURCES = getdns_address.c getdns_context.c getdns_convert.c \
|
||||
getdns_dict.c getdns_general.c getdns_hostname.c getdns_list.c \
|
||||
|
|
|
@ -235,7 +235,7 @@ target_alias = @target_alias@
|
|||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||
AM_CPPFLAGS = -Wall -Werror -g -fPIC -I$(srcdir)/ -I /usr/local/include -std=c99
|
||||
lib_LTLIBRARIES = libgetdns.la
|
||||
libgetdns_la_SOURCES = getdns_address.c getdns_context.c getdns_convert.c \
|
||||
getdns_dict.c getdns_general.c getdns_hostname.c getdns_list.c \
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <getdns_core_only.h>
|
||||
#include <getdns_libevent.h>
|
||||
|
||||
/* stuff to make it compile pedantically */
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <getdns_core_only.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* stuff to make it compile pedantically */
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <search.h>
|
||||
#include <string.h>
|
||||
#include <getdns_core_only.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||
AM_CPPFLAGS = -Wall -Werror -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||
AM_LDFLAGS = -L../common -L/usr/local/lib -lgetdns -lldns -levent
|
||||
bin_PROGRAMS = example_all_functions example_synchronous \
|
||||
example_simple_answers example_tree
|
||||
|
|
|
@ -218,7 +218,7 @@ target_alias = @target_alias@
|
|||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CPPFLAGS = -Wall -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||
AM_CPPFLAGS = -Wall -Werror -g -fPIC -I$(srcdir)/ -I/usr/local/include -I../common -std=c99
|
||||
AM_LDFLAGS = -L../common -L/usr/local/lib -lgetdns -lldns -levent
|
||||
example_all_functions_SOURCES = example_all_functions.c
|
||||
example_synchronous_SOURCES = example_synchronous.c
|
||||
|
|
Loading…
Reference in New Issue