From: Arran Cudbard-Bell Date: Mon, 10 Apr 2017 20:54:23 +0000 (-0400) Subject: Reorganise some libraries under src/lib X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd50a337c7dbdec009626e3d28932f1eae6a185d;p=thirdparty%2Ffreeradius-server.git Reorganise some libraries under src/lib --- diff --git a/configure b/configure index 3191dea528c..5bd586dd63d 100755 --- a/configure +++ b/configure @@ -682,6 +682,7 @@ CPPFLAGS LDFLAGS CFLAGS CC +TARGET_SYSTEM target_os target_vendor target_cpu @@ -2720,6 +2721,8 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- +TARGET_SYSTEM="$target" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -9562,7 +9565,7 @@ $as_echo "$as_me: WARNING: kqueue headers not found. Use --with-kqueue-include-d fi fi -case "$host" in +case "$target" in *-interix*) CFLAGS="$CFLAGS -D_ALL_SOURCE" ;; @@ -14293,7 +14296,7 @@ $as_echo "#define BSDSTYLE 3" >>confdefs.h gethostbyaddrrstyle="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyaddr_r() syntax" >&5 $as_echo_n "checking gethostbyaddr_r() syntax... " >&6; } -case "$host" in +case "$target" in *-freebsd*) ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" " #ifdef HAVE_NETDB_H @@ -14698,6 +14701,10 @@ for bar in $MODULES; do fi done +for foo in `find "${srcdir}"/src/lib/ -type f -name configure`; do + mysubdirs="$mysubdirs $(dirname $foo)" +done + subdirs="$subdirs $mysubdirs" diff --git a/configure.ac b/configure.ac index cffda2d0f21..1a9f5b56306 100644 --- a/configure.ac +++ b/configure.ac @@ -2115,6 +2115,13 @@ for bar in $MODULES; do fi done +dnl ############################################################ +dnl # Find any support libraries we need to build +dnl ############################################################# +for foo in `find "${srcdir}"/src/lib/ -type f -name configure`; do + mysubdirs="$mysubdirs $(dirname $foo)" +done + dnl # dnl # Don't change the variable name here. Autoconf goes bonkers dnl # if you do. diff --git a/debian/control.in b/debian/control.in index 8f5b71f0888..b3f0c5491e5 100644 --- a/debian/control.in +++ b/debian/control.in @@ -93,7 +93,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends} Conflicts: libfreeradius3 Description: FreeRADIUS shared library - The FreeRADIUS projects' libfreeradius-radius and libfreeradius-eap, used by + The FreeRADIUS projects' libfreeradius-util and libfreeradius-eap, used by the FreeRADIUS server and some of the utilities. Package: libfreeradius-dev @@ -101,7 +101,7 @@ Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends}, libfreeradius4 (= ${binary:Version}) Description: FreeRADIUS shared library development files - The FreeRADIUS projects' libfreeradius-radius and libfreeradius-eap, used by + The FreeRADIUS projects' libfreeradius-util and libfreeradius-eap, used by the FreeRADIUS server and some of the utilities. . This package contains the development headers and static library version. diff --git a/debian/libfreeradius-dev.install b/debian/libfreeradius-dev.install index 869a68956b8..45289ba5d95 100644 --- a/debian/libfreeradius-dev.install +++ b/debian/libfreeradius-dev.install @@ -1,3 +1,3 @@ -usr/lib/freeradius/libfreeradius-radius.a +usr/lib/freeradius/libfreeradius-util.a usr/lib/freeradius/libfreeradius-eap.a usr/include/freeradius/*.h diff --git a/debian/libfreeradius4.install b/debian/libfreeradius4.install index e5019934b6f..4f0bad69b1e 100644 --- a/debian/libfreeradius4.install +++ b/debian/libfreeradius4.install @@ -1,3 +1,3 @@ usr/lib/freeradius/libfreeradius-server.so -usr/lib/freeradius/libfreeradius-radius.so +usr/lib/freeradius/libfreeradius-util.so usr/lib/freeradius/libfreeradius-eap.so diff --git a/src/all.mk b/src/all.mk index 1babee18780..d7a8a4ff21f 100644 --- a/src/all.mk +++ b/src/all.mk @@ -1,4 +1,4 @@ # add this dependency BEFORE including the other submakefiles. all: -SUBMAKEFILES := include/all.mk lib/all.mk modules/all.mk main/all.mk util/all.mk tests/all.mk +SUBMAKEFILES := include/all.mk lib/all.mk modules/all.mk main/all.mk tests/all.mk diff --git a/src/include/io b/src/include/io new file mode 120000 index 00000000000..695a0a30c36 --- /dev/null +++ b/src/include/io @@ -0,0 +1 @@ +../lib/io/ \ No newline at end of file diff --git a/src/include/ldap b/src/include/ldap new file mode 120000 index 00000000000..232d4d2f897 --- /dev/null +++ b/src/include/ldap @@ -0,0 +1 @@ +../lib/ldap/ \ No newline at end of file diff --git a/src/include/protocol.h b/src/include/protocol.h index 98d9c35e7ba..13ef75595dd 100644 --- a/src/include/protocol.h +++ b/src/include/protocol.h @@ -74,6 +74,7 @@ typedef struct rad_protocol_t { rad_listen_decode_t decode; //!< Decode an incoming packet. } rad_protocol_t; +#define TRANSPORT_NONE 0 #define TRANSPORT_TCP (1 << IPPROTO_TCP) #define TRANSPORT_UDP (1 << IPPROTO_UDP) #define TRANSPORT_DUAL (TRANSPORT_UDP | TRANSPORT_TCP) diff --git a/src/include/rad_assert.h b/src/include/rad_assert.h index 1df0e7c4c17..c7ee6bf5ac7 100644 --- a/src/include/rad_assert.h +++ b/src/include/rad_assert.h @@ -31,16 +31,16 @@ extern "C" { #endif #ifndef NDEBUG -bool rad_assert_fail(char const *file, unsigned int line, char const *expr) CC_HINT(noreturn); +bool fr_assert_fail(char const *file, unsigned int line, char const *expr) CC_HINT(noreturn); #else -bool rad_assert_fail(char const *file, unsigned int line, char const *expr); +bool fr_assert_fail(char const *file, unsigned int line, char const *expr); #endif #ifdef NDEBUG # define rad_assert(_expr) #elif !defined(__clang_analyzer__) -# define rad_assert(_expr) ((void) ((_expr) ? (void) 0 : (void) rad_assert_fail(__FILE__, __LINE__, #_expr))) +# define rad_assert(_expr) ((void) ((_expr) ? (void) 0 : (void) fr_assert_fail(__FILE__, __LINE__, #_expr))) #else # include # define rad_assert assert @@ -58,7 +58,7 @@ bool rad_assert_fail(char const *file, unsigned int line, char const *expr); /** Use for conditions that should result in an assert in dev builds, and return in non-dev builds * */ -#define rad_cond_assert(_x) (bool)((_x) ? true : (rad_assert_fail(__FILE__, __LINE__, #_x) && false)) +#define rad_cond_assert(_x) (bool)((_x) ? true : (fr_assert_fail(__FILE__, __LINE__, #_x) && false)) #ifdef __cplusplus } diff --git a/src/lib/all.mk b/src/lib/all.mk index 455337d034e..c339107b89a 100644 --- a/src/lib/all.mk +++ b/src/lib/all.mk @@ -1,59 +1 @@ -# -# Makefile -# -# Version: $Id$ -# -TARGET := libfreeradius-radius.a - -SOURCES := cbuff.c \ - cursor.c \ - debug.c \ - dict.c \ - filters.c \ - hash.c \ - hmacmd5.c \ - hmacsha1.c \ - inet.c \ - isaac.c \ - log.c \ - misc.c \ - missing.c \ - md4.c \ - md5.c \ - net.c \ - pair.c \ - pair_cursor.c \ - pcap.c \ - print.c \ - proto.c \ - radius.c \ - radius_encode.c \ - radius_decode.c \ - rbtree.c \ - regex.c \ - sha1.c \ - snprintf.c \ - strerror.c \ - strlcat.c \ - strlcpy.c \ - syserror.c \ - socket.c \ - token.c \ - udpfromto.c \ - value.c \ - fifo.c \ - packet.c \ - event.c \ - getaddrinfo.c \ - heap.c \ - tcp.c \ - udp.c \ - base64.c \ - version.c - -SRC_CFLAGS := -D_LIBRADIUS -I$(top_builddir)/src - -# System libraries discovered by our top level configure script, links things -# like pthread and the regexp libraries. -TGT_LDLIBS := $(LIBS) $(PCAP_LIBS) -TGT_LDFLAGS := $(LDFLAGS) $(PCAP_LDFLAGS) +SUBMAKEFILES := io/all.mk ldap/all.mk util/all.mk diff --git a/src/util/all.mk b/src/lib/io/all.mk similarity index 68% rename from src/util/all.mk rename to src/lib/io/all.mk index 70e1140a1ec..cfb22b5786e 100644 --- a/src/util/all.mk +++ b/src/lib/io/all.mk @@ -1,9 +1,9 @@ -TARGET := libfreeradius-util.a +TARGET := libfreeradius-io.a SOURCES := ring_buffer.c message.c atomic_queue.c queue.c time.c channel.c track.c worker.c \ schedule.c receiver.c control.c -TGT_PREREQS := libfreeradius-radius.la +TGT_PREREQS := libfreeradius-util.la TGT_LDLIBS := $(LIBS) TGT_LDFLAGS := $(LDFLAGS) @@ -14,9 +14,9 @@ TGT_LDFLAGS := $(LDFLAGS) HEADERS := $(SOURCES:.c=.h) define ADD_UTIL_HEADER -${SRC_INCLUDE_DIR}/util/${1}: src/include/util/${1} +${SRC_INCLUDE_DIR}/io/${1}: src/include/io/${1} -install.src.include: ${SRC_INCLUDE_DIR}/util/${1} +install.src.include: ${SRC_INCLUDE_DIR}/io/${1} endef $(foreach x,$(HEADERS),$(eval $(call ADD_UTIL_HEADER,$x))) diff --git a/src/util/atomic_queue.c b/src/lib/io/atomic_queue.c similarity index 98% rename from src/util/atomic_queue.c rename to src/lib/io/atomic_queue.c index 23e7e724f52..80bd6303f7e 100644 --- a/src/util/atomic_queue.c +++ b/src/lib/io/atomic_queue.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Thread-safe queues. - * @file util/atomic_queue.c + * @file io/atomic_queue.c * * @copyright 2016 Alan DeKok * @copyright 2016 Alister Winfield @@ -36,7 +36,7 @@ RCSID("$Id$") # include #endif -#include +#include /* * Some macros to make our life easier. diff --git a/src/util/atomic_queue.h b/src/lib/io/atomic_queue.h similarity index 97% rename from src/util/atomic_queue.h rename to src/lib/io/atomic_queue.h index 0aa9c56ac93..a703a60e269 100644 --- a/src/util/atomic_queue.h +++ b/src/lib/io/atomic_queue.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/atomic_queue.h + * @file io/atomic_queue.h * @brief Thread-safe queues. * * @copyright 2016 Alan DeKok diff --git a/src/util/channel.c b/src/lib/io/channel.c similarity index 99% rename from src/util/channel.c rename to src/lib/io/channel.c index 49c464e9e36..fcbe90b1c9f 100644 --- a/src/util/channel.c +++ b/src/lib/io/channel.c @@ -18,14 +18,14 @@ * $Id$ * * @brief Two-way thread-safe channels - * @file util/channel.c + * @file io/channel.c * * @copyright 2016 Alan DeKok */ RCSID("$Id$") -#include -#include +#include +#include #include #include diff --git a/src/util/channel.h b/src/lib/io/channel.h similarity index 97% rename from src/util/channel.h rename to src/lib/io/channel.h index 85bb3791c4c..880ed238f8c 100644 --- a/src/util/channel.h +++ b/src/lib/io/channel.h @@ -18,15 +18,15 @@ /** * $Id$ * - * @file util/channel.h + * @file io/channel.h * @brief 2-way channels based on kqueue and atomic queues. * * @copyright 2016 Alan DeKok */ RCSIDH(channel_h, "$Id$") -#include -#include +#include +#include #include #include diff --git a/src/util/control.c b/src/lib/io/control.c similarity index 99% rename from src/util/control.c rename to src/lib/io/control.c index 4768b0d8aef..1d3b34398cf 100644 --- a/src/util/control.c +++ b/src/lib/io/control.c @@ -18,14 +18,14 @@ * $Id$ * * @brief Control-plane signaling - * @file util/control.c + * @file io/control.c * * @copyright 2016 Alan DeKok */ RCSID("$Id$") -#include -#include +#include +#include #include #include diff --git a/src/util/control.h b/src/lib/io/control.h similarity index 94% rename from src/util/control.h rename to src/lib/io/control.h index 619095e2f09..0706c698305 100644 --- a/src/util/control.h +++ b/src/lib/io/control.h @@ -18,16 +18,16 @@ /** * $Id$ * - * @file util/control.h + * @file io/control.h * @brief control-plane signaling * * @copyright 2016 Alan DeKok */ RCSIDH(control_h, "$Id$") -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/util/message.c b/src/lib/io/message.c similarity index 99% rename from src/util/message.c rename to src/lib/io/message.c index 4e9677e9f47..c7ebbcc4473 100644 --- a/src/util/message.c +++ b/src/lib/io/message.c @@ -18,13 +18,13 @@ * $Id$ * * @brief Messages for inter-thread communication - * @file util/message.c + * @file io/message.c * * @copyright 2016 Alan DeKok */ RCSID("$Id$") -#include +#include #include #include diff --git a/src/util/message.h b/src/lib/io/message.h similarity index 95% rename from src/util/message.h rename to src/lib/io/message.h index d4eaf09c03f..9b673e2ed0e 100644 --- a/src/util/message.h +++ b/src/lib/io/message.h @@ -18,15 +18,15 @@ /** * $Id$ * - * @file util/message.h + * @file io/message.h * @brief Inter-thread messaging * * @copyright 2016 Alan DeKok */ RCSIDH(message_h, "$Id$") -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/util/queue.c b/src/lib/io/queue.c similarity index 98% rename from src/util/queue.c rename to src/lib/io/queue.c index c7e7c8b9760..556b26a38d3 100644 --- a/src/util/queue.c +++ b/src/lib/io/queue.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Thread-unsafe queues - * @file util/queue.c + * @file io/queue.c * * @copyright 2016 Alan DeKok */ @@ -28,7 +28,7 @@ RCSID("$Id$") #include #include -#include +#include struct fr_queue_t { int head; //!< head of the queue diff --git a/src/util/queue.h b/src/lib/io/queue.h similarity index 95% rename from src/util/queue.h rename to src/lib/io/queue.h index 7899d4e1c4f..110db33a695 100644 --- a/src/util/queue.h +++ b/src/lib/io/queue.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/queue.h + * @file io/queue.h * @brief Thread-unsafe queues. * * @copyright 2016 Alan DeKok @@ -27,7 +27,7 @@ RCSIDH(queue_h, "$Id$") #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/util/receiver.c b/src/lib/io/receiver.c similarity index 98% rename from src/util/receiver.c rename to src/lib/io/receiver.c index 2397b6c86c7..cdf2399d99a 100644 --- a/src/util/receiver.c +++ b/src/lib/io/receiver.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Receiver of socket data, which sends messages to the workers. - * @file util/receiver.c + * @file io/receiver.c * * @copyright 2016 Alan DeKok */ @@ -27,11 +27,11 @@ RCSID("$Id$") #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/src/util/receiver.h b/src/lib/io/receiver.h similarity index 98% rename from src/util/receiver.h rename to src/lib/io/receiver.h index 6ba49868a20..dcc655646f2 100644 --- a/src/util/receiver.h +++ b/src/lib/io/receiver.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/receiver.h + * @file io/receiver.h * @brief Receive packets * * @copyright 2016 Alan DeKok diff --git a/src/util/ring_buffer.c b/src/lib/io/ring_buffer.c similarity index 99% rename from src/util/ring_buffer.c rename to src/lib/io/ring_buffer.c index a5b0cc891a8..dd85b8c2aed 100644 --- a/src/util/ring_buffer.c +++ b/src/lib/io/ring_buffer.c @@ -18,13 +18,13 @@ * $Id$ * * @brief Simple ring buffers for packet contents - * @file util/ring_buffer.c + * @file io/ring_buffer.c * * @copyright 2016 Alan DeKok */ RCSID("$Id$") -#include +#include #include #include #include diff --git a/src/util/ring_buffer.h b/src/lib/io/ring_buffer.h similarity index 98% rename from src/util/ring_buffer.h rename to src/lib/io/ring_buffer.h index c0021fa6e96..32d8291c1cc 100644 --- a/src/util/ring_buffer.h +++ b/src/lib/io/ring_buffer.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/ring_buffer.h + * @file io/ring_buffer.h * @brief Ring buffers * * @copyright 2016 The FreeRADIUS Server Project diff --git a/src/util/schedule.c b/src/lib/io/schedule.c similarity index 99% rename from src/util/schedule.c rename to src/lib/io/schedule.c index 2705ddd476c..44c8f7dee0e 100644 --- a/src/util/schedule.c +++ b/src/lib/io/schedule.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Network / worker thread scheduling - * @file util/schedule.c + * @file io/schedule.c * * @copyright 2016 Alan DeKok */ @@ -27,10 +27,10 @@ RCSID("$Id$") #include #include -#include +#include #include -#include +#include #ifdef HAVE_PTHREAD_H #include diff --git a/src/util/schedule.h b/src/lib/io/schedule.h similarity index 96% rename from src/util/schedule.h rename to src/lib/io/schedule.h index d984bddc483..02b85212acb 100644 --- a/src/util/schedule.h +++ b/src/lib/io/schedule.h @@ -18,14 +18,14 @@ /** * $Id$ * - * @file util/schedule.h + * @file io/schedule.h * @brief Scheduler communication. * * @copyright 2016 Alan DeKok */ RCSIDH(schedule_h, "$Id$") -#include +#include #include #ifdef __cplusplus diff --git a/src/util/time.c b/src/lib/io/time.c similarity index 98% rename from src/util/time.c rename to src/lib/io/time.c index d4589b3c488..075059fce67 100644 --- a/src/util/time.c +++ b/src/lib/io/time.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Platform independent time functions - * @file util/time.c + * @file io/time.c * * @copyright 2016 Alan DeKok */ @@ -26,7 +26,7 @@ RCSID("$Id$") #include #include -#include +#include /* * Avoid too many ifdef's later in the code. diff --git a/src/util/time.h b/src/lib/io/time.h similarity index 99% rename from src/util/time.h rename to src/lib/io/time.h index cff225bb91e..e75119e9729 100644 --- a/src/util/time.h +++ b/src/lib/io/time.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/time.h + * @file io/time.h * @brief Simple time functions * * @copyright 2016 Alan DeKok diff --git a/src/util/track.c b/src/lib/io/track.c similarity index 98% rename from src/util/track.c rename to src/lib/io/track.c index b13c0ccf0cd..f25dbdfc969 100644 --- a/src/util/track.c +++ b/src/lib/io/track.c @@ -18,13 +18,13 @@ * $Id$ * * @brief RADIUS packet tracking - * @file util/track.c + * @file io/track.c * * @copyright 2016 Alan DeKok */ RCSID("$Id$") -#include +#include #include /** diff --git a/src/util/track.h b/src/lib/io/track.h similarity index 97% rename from src/util/track.h rename to src/lib/io/track.h index e58749c8558..d22f0cd9736 100644 --- a/src/util/track.h +++ b/src/lib/io/track.h @@ -18,14 +18,14 @@ /** * $Id$ * - * @file util/track.h + * @file io/track.h * @brief RADIUS packet tracking. * * @copyright 2016 Alan DeKok */ RCSIDH(track_h, "$Id$") -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/util/transport.h b/src/lib/io/transport.h similarity index 97% rename from src/util/transport.h rename to src/lib/io/transport.h index 37e86ab196b..13ba65fdfab 100644 --- a/src/util/transport.h +++ b/src/lib/io/transport.h @@ -18,16 +18,16 @@ /** * $Id$ * - * @file util/transport.h + * @file io/transport.h * @brief Transport-specific functions. * * @copyright 2016 Alan DeKok */ RCSIDH(transport_h, "$Id$") -#include -#include -//#include +#include +#include +//#include #ifdef __cplusplus extern "C" { diff --git a/src/util/worker.c b/src/lib/io/worker.c similarity index 99% rename from src/util/worker.c rename to src/lib/io/worker.c index c22b898cd79..d4a436cab1d 100644 --- a/src/util/worker.c +++ b/src/lib/io/worker.c @@ -18,7 +18,7 @@ * $Id$ * * @brief Worker thread functions. - * @file util/worker.c + * @file io/worker.c * * The "worker" thread is the one responsible for the bulk of the * work done when processing a request. Workers are spawned by the @@ -61,9 +61,9 @@ */ RCSID("$Id$") -#include -#include -#include +#include +#include +#include #include /** diff --git a/src/util/worker.h b/src/lib/io/worker.h similarity index 96% rename from src/util/worker.h rename to src/lib/io/worker.h index e64b9060e73..706817c5aa5 100644 --- a/src/util/worker.h +++ b/src/lib/io/worker.h @@ -18,7 +18,7 @@ /** * $Id$ * - * @file util/worker.h + * @file io/worker.h * @brief Functions and data structures for worker threads. * * @copyright 2016 Alan DeKok @@ -31,7 +31,7 @@ RCSIDH(worker_h, "$Id$") #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/lib/ldap/all.mk b/src/lib/ldap/all.mk new file mode 100644 index 00000000000..bbad1f18f67 --- /dev/null +++ b/src/lib/ldap/all.mk @@ -0,0 +1,10 @@ +TARGETNAME := libfreeradius-ldap + +ifneq "$(TARGETNAME)" "" +TARGET := $(TARGETNAME).a +endif + +SOURCES := libfreeradius-ldap.c control.c directory.c edir.c util.c + +SRC_CFLAGS := +TGT_LDLIBS := -lldap diff --git a/src/modules/rlm_ldap/libfreeradius-ldap.mk.in b/src/lib/ldap/all.mk.in similarity index 65% rename from src/modules/rlm_ldap/libfreeradius-ldap.mk.in rename to src/lib/ldap/all.mk.in index 68b3dce493e..8d717d5d30f 100644 --- a/src/modules/rlm_ldap/libfreeradius-ldap.mk.in +++ b/src/lib/ldap/all.mk.in @@ -4,7 +4,7 @@ ifneq "$(TARGETNAME)" "" TARGET := $(TARGETNAME).a endif -SOURCES := control.c directory.c edir.c ldap.c util.c @SASL@ +SOURCES := libfreeradius-ldap.c control.c directory.c edir.c util.c @SASL@ SRC_CFLAGS := @mod_cflags@ TGT_LDLIBS := @mod_ldflags@ diff --git a/src/modules/rlm_ldap/config.h.in b/src/lib/ldap/config.h.in similarity index 100% rename from src/modules/rlm_ldap/config.h.in rename to src/lib/ldap/config.h.in diff --git a/src/modules/rlm_ldap/configure b/src/lib/ldap/configure similarity index 78% rename from src/modules/rlm_ldap/configure rename to src/lib/ldap/configure index acb62af22bc..79640af36b8 100755 --- a/src/modules/rlm_ldap/configure +++ b/src/lib/ldap/configure @@ -582,7 +582,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= -ac_unique_file="rlm_ldap.c" +ac_unique_file="libfreeradius-ldap.c" ac_subst_vars='LTLIBOBJS LIBOBJS targetname @@ -637,8 +637,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -with_rlm_ldap_lib_dir -with_rlm_ldap_include_dir +with_libfreeradius_ldap_lib_dir +with_libfreeradius_ldap_include_dir ' ac_precious_vars='build_alias host_alias @@ -1254,8 +1254,8 @@ if test -n "$ac_init_help"; then Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-rlm-ldap-lib-dir=DIR directory for LDAP library files - --with-rlm-ldap-include-dir=DIR directory for LDAP include files + --with-libfreeradius-ldap-lib-dir=DIR directory for LDAP library files + --with-libfreeradius-ldap-include-dir=DIR directory for LDAP include files Some influential environment variables: CC C compiler command @@ -2694,36 +2694,36 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - rlm_ldap_lib_dir= + libfreeradius_ldap_lib_dir= -# Check whether --with-rlm-ldap-lib-dir was given. -if test "${with_rlm_ldap_lib_dir+set}" = set; then : - withval=$with_rlm_ldap_lib_dir; case "$withval" in +# Check whether --with-libfreeradius-ldap-lib-dir was given. +if test "${with_libfreeradius_ldap_lib_dir+set}" = set; then : + withval=$with_libfreeradius_ldap_lib_dir; case "$withval" in no) - as_fn_error $? "Need rlm-ldap-lib-dir" "$LINENO" 5 + as_fn_error $? "Need libfreeradius-ldap-lib-dir" "$LINENO" 5 ;; yes) ;; *) - rlm_ldap_lib_dir="$withval" + libfreeradius_ldap_lib_dir="$withval" ;; esac fi - rlm_ldap_include_dir= + libfreeradius_ldap_include_dir= -# Check whether --with-rlm-ldap-include-dir was given. -if test "${with_rlm_ldap_include_dir+set}" = set; then : - withval=$with_rlm_ldap_include_dir; case "$withval" in +# Check whether --with-libfreeradius-ldap-include-dir was given. +if test "${with_libfreeradius_ldap_include_dir+set}" = set; then : + withval=$with_libfreeradius_ldap_include_dir; case "$withval" in no) - as_fn_error $? "Need rlm-ldap-include-dir" "$LINENO" 5 + as_fn_error $? "Need libfreeradius-ldap-include-dir" "$LINENO" 5 ;; yes) ;; *) - rlm_ldap_include_dir="$withval" + libfreeradius_ldap_include_dir="$withval" ;; esac @@ -2733,7 +2733,7 @@ fi CFLAGS="-DLDAP_DEPRECATED=1 ${CFLAGS}" - smart_try_dir=$rlm_ldap_lib_dir + smart_try_dir=$libfreeradius_ldap_lib_dir @@ -2914,7 +2914,7 @@ fi fi - smart_try_dir=$rlm_ldap_include_dir + smart_try_dir=$libfreeradius_ldap_include_dir ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'` @@ -3499,1282 +3499,6 @@ ac_config_headers="$ac_config_headers config.h" unset ac_cv_env_LIBS_set unset ac_cv_env_LIBS_value -ac_config_files="$ac_config_files libfreeradius-ldap.mk" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "libfreeradius-ldap.mk") CONFIG_FILES="$CONFIG_FILES libfreeradius-ldap.mk" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - ac_config_files="$ac_config_files all.mk" cat >confcache <<\_ACEOF @@ -5467,7 +4191,6 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "libfreeradius-ldap.mk") CONFIG_FILES="$CONFIG_FILES libfreeradius-ldap.mk" ;; "all.mk") CONFIG_FILES="$CONFIG_FILES all.mk" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -6050,3 +4773,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/src/modules/rlm_ldap/configure.ac b/src/lib/ldap/configure.ac similarity index 84% rename from src/modules/rlm_ldap/configure.ac rename to src/lib/ldap/configure.ac index 35c0e43894f..6703d2d74c4 100644 --- a/src/modules/rlm_ldap/configure.ac +++ b/src/lib/ldap/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.53]) -AC_INIT(rlm_ldap.c) +AC_INIT(libfreeradius-ldap.c) AC_REVISION($Revision$) AC_DEFUN(modname,[libfreeradius-ldap]) @@ -18,34 +18,34 @@ if test x$with_[]modname != xno; then dnl # Check for command line options dnl ############################################################ - dnl # extra argument: --with-rlm-ldap-lib-dir - rlm_ldap_lib_dir= - AC_ARG_WITH(rlm-ldap-lib-dir, - [ --with-rlm-ldap-lib-dir=DIR directory for LDAP library files []], + dnl # extra argument: --with-libfreeradius-ldap-lib-dir + libfreeradius_ldap_lib_dir= + AC_ARG_WITH(libfreeradius-ldap-lib-dir, + [ --with-libfreeradius-ldap-lib-dir=DIR directory for LDAP library files []], [ case "$withval" in no) - AC_MSG_ERROR(Need rlm-ldap-lib-dir) + AC_MSG_ERROR(Need libfreeradius-ldap-lib-dir) ;; yes) ;; *) - rlm_ldap_lib_dir="$withval" + libfreeradius_ldap_lib_dir="$withval" ;; esac ] ) - dnl # extra argument: --with-rlm-ldap-include-dir - rlm_ldap_include_dir= - AC_ARG_WITH(rlm-ldap-include-dir, - [ --with-rlm-ldap-include-dir=DIR directory for LDAP include files []], + dnl # extra argument: --with-libfreeradius-ldap-include-dir + libfreeradius_ldap_include_dir= + AC_ARG_WITH(libfreeradius-ldap-include-dir, + [ --with-libfreeradius-ldap-include-dir=DIR directory for LDAP include files []], [ case "$withval" in no) - AC_MSG_ERROR(Need rlm-ldap-include-dir) + AC_MSG_ERROR(Need libfreeradius-ldap-include-dir) ;; yes) ;; *) - rlm_ldap_include_dir="$withval" + libfreeradius_ldap_include_dir="$withval" ;; esac ] ) @@ -54,7 +54,7 @@ if test x$with_[]modname != xno; then dnl # Check for libraries dnl ############################################################ - dnl # We set this in rlm_ldap.h when we include ldap.h, so for + dnl # We set this in libfreeradius_ldap.h when we include ldap.h, so for dnl # consistency we need to set it here too, else we might dnl # get differing results for DECL checks. CFLAGS="-DLDAP_DEPRECATED=1 ${CFLAGS}" @@ -71,7 +71,7 @@ if test x$with_[]modname != xno; then dnl # or packagers that only ship libldap in their OpenLDAP dnl # client packages, we're forced to switch to just libldap. dnl # - smart_try_dir=$rlm_ldap_lib_dir + smart_try_dir=$libfreeradius_ldap_lib_dir FR_SMART_CHECK_LIB(ldap, ldap_init) if test "x$ac_cv_lib_ldap_ldap_init" != "xyes"; then fail="$fail libldap" @@ -81,7 +81,7 @@ if test x$with_[]modname != xno; then dnl # Check for header files dnl ############################################################ - smart_try_dir=$rlm_ldap_include_dir + smart_try_dir=$libfreeradius_ldap_include_dir FR_SMART_CHECK_INCLUDE(ldap.h) if test "$ac_cv_header_ldap_h" != "yes"; then fail="$fail ldap.h" @@ -162,8 +162,6 @@ AC_SUBST(SASL) AC_SUBST(targetname) AC_CONFIG_HEADER(config.h) -AC_OUTPUT(libfreeradius-ldap.mk) - dnl # This is needed so that all.mk is not created unless configure is run dnl # so that it doesn't attempt to include libfreeradius-redis.mk which dnl # is also dependent on configure being run. diff --git a/src/modules/rlm_ldap/control.c b/src/lib/ldap/control.c similarity index 99% rename from src/modules/rlm_ldap/control.c rename to src/lib/ldap/control.c index 131b356d30b..3ad26746d6f 100644 --- a/src/modules/rlm_ldap/control.c +++ b/src/lib/ldap/control.c @@ -16,7 +16,7 @@ /** * $Id$ - * @file src/modules/rlm_ldap/control.c + * @file lib/ldap/control.c * @brief Functions for managing server/client side sort controls. * * @author Arran Cudbard-Bell @@ -25,7 +25,7 @@ #define LOG_PREFIX "fr_ldap (%s) - " #define LOG_PREFIX_ARGS inst->name -#include "rlm_ldap.h" +#include "libfreeradius-ldap.h" /** Merge connection and call specific client and server controls * diff --git a/src/modules/rlm_ldap/directory.c b/src/lib/ldap/directory.c similarity index 99% rename from src/modules/rlm_ldap/directory.c rename to src/lib/ldap/directory.c index 4514b4d2bd6..c5b250a36af 100644 --- a/src/modules/rlm_ldap/directory.c +++ b/src/lib/ldap/directory.c @@ -27,7 +27,7 @@ #define LOG_PREFIX "%s - " #define LOG_PREFIX_ARGS (*pconn)->config->name -#include "libldap.h" +#include "libfreeradius-ldap.h" static FR_NAME_NUMBER const ldap_directory_type_table[] = { { "Unknown", LDAP_DIRECTORY_UNKNOWN }, diff --git a/src/modules/rlm_ldap/edir.c b/src/lib/ldap/edir.c similarity index 97% rename from src/modules/rlm_ldap/edir.c rename to src/lib/ldap/edir.c index a55e059c9dd..5a3c4b00a8b 100644 --- a/src/modules/rlm_ldap/edir.c +++ b/src/lib/ldap/edir.c @@ -29,11 +29,7 @@ RCSID("$Id$") #include - -#define LOG_PREFIX "rlm_ldap (%s) - " -#define LOG_PREFIX_ARGS inst->name - -#include "rlm_ldap.h" +#include "libfreeradius-ldap.h" /* NMAS error codes */ #define NMAS_E_BASE (-1600) @@ -163,7 +159,7 @@ finish: * - 0 on success. * - < 0 on failure. */ -int nmasldap_get_password(LDAP *ld, char const *dn, char *password, size_t *passlen) +int fr_ldap_edir_get_password(LDAP *ld, char const *dn, char *password, size_t *passlen) { int err = 0; struct berval *request_bv = NULL; @@ -243,7 +239,8 @@ finish: return err; } -char const *edir_errstr(int code) { +char const *fr_ldap_edir_errstr(int code) +{ switch (code) { case NMAS_E_FRAG_FAILURE: return "BER manipulation failed"; diff --git a/src/modules/rlm_ldap/ldap.c b/src/lib/ldap/libfreeradius-ldap.c similarity index 99% rename from src/modules/rlm_ldap/ldap.c rename to src/lib/ldap/libfreeradius-ldap.c index 8ad5eb79e11..86cb93bc821 100644 --- a/src/modules/rlm_ldap/ldap.c +++ b/src/lib/ldap/libfreeradius-ldap.c @@ -16,7 +16,7 @@ /** * $Id$ - * @file ldap.c + * @file lib/ldap/libfreeradius-ldap.c * @brief LDAP module library functions. * * @author Arran Cudbard-Bell @@ -31,7 +31,7 @@ #define LOG_PREFIX_ARGS handle_config->name #include -#include "libldap.h" +#include "libfreeradius-ldap.h" LDAP *ldap_global_handle; //!< Hack for OpenLDAP libldap global initialisation. static int instance_count = 0; diff --git a/src/modules/rlm_ldap/libldap.h b/src/lib/ldap/libfreeradius-ldap.h similarity index 98% rename from src/modules/rlm_ldap/libldap.h rename to src/lib/ldap/libfreeradius-ldap.h index 90bbd934207..4c71fb611a3 100644 --- a/src/modules/rlm_ldap/libldap.h +++ b/src/lib/ldap/libfreeradius-ldap.h @@ -1,6 +1,6 @@ /** * $Id$ - * @file libldap.h + * @file lib/ldap/libfreeradius-ldap.h * @brief Common utility functions for interacting with LDAP directories * * @note Do not rename to ldap.h. This causes configure checks to break @@ -392,6 +392,12 @@ int fr_ldap_control_add_session_tracking(ldap_handle_t *conn, REQUEST *request) */ int fr_ldap_directory_alloc(TALLOC_CTX *ctx, ldap_directory_t **out, ldap_handle_t **pconn); +/* + * edir.c - Edirectory integrations + */ +int fr_ldap_edir_get_password(LDAP *ld, char const *dn, char *password, size_t *passlen); + +char const *fr_ldap_edir_errstr(int code); /* * sasl.c - SASL bind functions diff --git a/src/modules/rlm_ldap/sasl.c b/src/lib/ldap/sasl.c similarity index 99% rename from src/modules/rlm_ldap/sasl.c rename to src/lib/ldap/sasl.c index a683c84f876..8324a901544 100644 --- a/src/modules/rlm_ldap/sasl.c +++ b/src/lib/ldap/sasl.c @@ -16,7 +16,7 @@ /** * $Id$ - * @file sasl.c + * @file lib/ldap/sasl.c * @brief Functions to perform SASL binds against an LDAP directory. * * @author Arran Cudbard-Bell @@ -28,7 +28,7 @@ #include #include -#include "rlm_ldap.h" +#include "libfreeradius-ldap.h" #include diff --git a/src/modules/rlm_ldap/util.c b/src/lib/ldap/util.c similarity index 99% rename from src/modules/rlm_ldap/util.c rename to src/lib/ldap/util.c index e87d65b52f6..7cc2f6431bb 100644 --- a/src/modules/rlm_ldap/util.c +++ b/src/lib/ldap/util.c @@ -16,14 +16,14 @@ /** * $Id$ - * @file src/modules/rlm_ldap/util.c + * @file lib/ldap/util.c * @brief Utility functions to escape and parse DNs * * @author Arran Cudbard-Bell * @copyright 2017 Arran Cudbard-Bell * @copyright 2017 The FreeRADIUS Server Project. */ -#include "rlm_ldap.h" +#include "libfreeradius-ldap.h" #include #include diff --git a/src/lib/LICENSE b/src/lib/util/LICENSE similarity index 100% rename from src/lib/LICENSE rename to src/lib/util/LICENSE diff --git a/src/lib/README b/src/lib/util/README similarity index 100% rename from src/lib/README rename to src/lib/util/README diff --git a/src/lib/util/all.mk b/src/lib/util/all.mk new file mode 100644 index 00000000000..cac204ceb82 --- /dev/null +++ b/src/lib/util/all.mk @@ -0,0 +1,59 @@ +# +# Makefile +# +# Version: $Id$ +# +TARGET := libfreeradius-util.a + +SOURCES := cbuff.c \ + cursor.c \ + debug.c \ + dict.c \ + filters.c \ + hash.c \ + hmacmd5.c \ + hmacsha1.c \ + inet.c \ + isaac.c \ + log.c \ + misc.c \ + missing.c \ + md4.c \ + md5.c \ + net.c \ + pair.c \ + pair_cursor.c \ + pcap.c \ + print.c \ + proto.c \ + radius.c \ + radius_encode.c \ + radius_decode.c \ + rbtree.c \ + regex.c \ + sha1.c \ + snprintf.c \ + strerror.c \ + strlcat.c \ + strlcpy.c \ + syserror.c \ + socket.c \ + token.c \ + udpfromto.c \ + value.c \ + fifo.c \ + packet.c \ + event.c \ + getaddrinfo.c \ + heap.c \ + tcp.c \ + udp.c \ + base64.c \ + version.c + +SRC_CFLAGS := -D_LIBRADIUS -I$(top_builddir)/src + +# System libraries discovered by our top level configure script, links things +# like pthread and the regexp libraries. +TGT_LDLIBS := $(LIBS) $(PCAP_LIBS) +TGT_LDFLAGS := $(LDFLAGS) $(PCAP_LDFLAGS) diff --git a/src/lib/base64.c b/src/lib/util/base64.c similarity index 99% rename from src/lib/base64.c rename to src/lib/util/base64.c index 8163ccbd1bd..7254b4bb6cf 100644 --- a/src/lib/base64.c +++ b/src/lib/util/base64.c @@ -18,7 +18,7 @@ */ /** - * @file lib/base64.c + * @file lib/util/base64.c * * @see RFC 3548 . * diff --git a/src/lib/cbuff.c b/src/lib/util/cbuff.c similarity index 99% rename from src/lib/cbuff.c rename to src/lib/util/cbuff.c index cb3bb977824..64b51602080 100644 --- a/src/lib/cbuff.c +++ b/src/lib/util/cbuff.c @@ -15,7 +15,7 @@ */ /** - * @file lib/cbuff.c + * @file lib/util/cbuff.c * @brief Implementation of a ring buffer * * @copyright 2013 The FreeRADIUS server project diff --git a/src/lib/cursor.c b/src/lib/util/cursor.c similarity index 99% rename from src/lib/cursor.c rename to src/lib/util/cursor.c index db0e8e02b88..a9b444b5371 100644 --- a/src/lib/cursor.c +++ b/src/lib/util/cursor.c @@ -16,7 +16,7 @@ /** * $Id$ * - * @file lib/cursor.c + * @file lib/util/cursor.c * @brief Functions to iterate over a sets and subsets of items. * * @note Do not modify collections of items pointed to by a cursor diff --git a/src/lib/debug.c b/src/lib/util/debug.c similarity index 98% rename from src/lib/debug.c rename to src/lib/util/debug.c index 9b9e0971f98..afeb3360ee4 100644 --- a/src/lib/debug.c +++ b/src/lib/util/debug.c @@ -15,13 +15,14 @@ */ /** - * @file lib/debug.c + * @file lib/util/debug.c * @brief Various functions to aid in debugging * * @copyright 2013 The FreeRADIUS server project * @copyright 2013 Arran Cudbard-Bell */ #include +#include #include #include #include @@ -1105,6 +1106,26 @@ bool fr_cond_assert_fail(char const *file, int line, char const *expr) return false; } +/* + * Logs an error message and aborts the program + * + */ +#ifndef NDEBUG +bool fr_assert_fail(char const *file, unsigned int line, char const *expr) +{ + FR_FAULT_LOG("ASSERT FAILED %s[%u]: %s", file, line, expr); + fr_fault(SIGABRT); + fr_exit_now(1); +} +#else +bool fr_assert_fail(char const *file, unsigned int line, char const *expr) +{ + FR_FAULT_LOG("ASSERT WOULD FAIL %s[%u]: %s", file, line, expr); + return false; +} +#endif + + /** Exit possibly printing a message about why we're exiting. * * @note Use the fr_exit(status) macro instead of calling this function directly. diff --git a/src/lib/dict.c b/src/lib/util/dict.c similarity index 99% rename from src/lib/dict.c rename to src/lib/util/dict.c index 4853ad7fa41..3938276c4b1 100644 --- a/src/lib/dict.c +++ b/src/lib/util/dict.c @@ -15,7 +15,7 @@ */ /** - * @file lib/dict.c + * @file lib/util/dict.c * @brief Functions to parse FreeRADIUS dictionary file(s). * * @copyright 2000,2006 The FreeRADIUS server project diff --git a/src/lib/event.c b/src/lib/util/event.c similarity index 99% rename from src/lib/event.c rename to src/lib/util/event.c index 313d8f633ad..697036aec8d 100644 --- a/src/lib/event.c +++ b/src/lib/util/event.c @@ -15,7 +15,7 @@ */ /** - * @file lib/event.c + * @file lib/util/event.c * @brief Non-thread-safe event handling, specific to a RADIUS server. * * @note By non-thread-safe we mean multiple threads can't insert/delete events concurrently diff --git a/src/lib/fifo.c b/src/lib/util/fifo.c similarity index 99% rename from src/lib/fifo.c rename to src/lib/util/fifo.c index f9e4b130946..5d7337274b6 100644 --- a/src/lib/fifo.c +++ b/src/lib/util/fifo.c @@ -15,7 +15,7 @@ */ /** - * @file lib/fifo.c + * @file lib/util/fifo.c * @brief Non-thread-safe fifo (FIFO) implementation. * * @copyright 2005,2006 The FreeRADIUS server project diff --git a/src/lib/filters.c b/src/lib/util/filters.c similarity index 99% rename from src/lib/filters.c rename to src/lib/util/filters.c index be6c3cd7499..3ee34967f46 100644 --- a/src/lib/filters.c +++ b/src/lib/util/filters.c @@ -15,7 +15,7 @@ */ /** - * @file lib/filters.c + * @file lib/util/filters.c * @brief Routines to parse Ascend's filter attributes. * * @copyright 2003,2006 The FreeRADIUS server project diff --git a/src/lib/getaddrinfo.c b/src/lib/util/getaddrinfo.c similarity index 99% rename from src/lib/getaddrinfo.c rename to src/lib/util/getaddrinfo.c index 0a822102d49..222ade5b91a 100644 --- a/src/lib/getaddrinfo.c +++ b/src/lib/util/getaddrinfo.c @@ -15,7 +15,7 @@ */ /** - * @file lib/getaddrinfo.c + * @file lib/util/getaddrinfo.c * @brief Replacement getaddrinfo functions. * * These functions are defined and used only if the configure diff --git a/src/lib/hash.c b/src/lib/util/hash.c similarity index 99% rename from src/lib/hash.c rename to src/lib/util/hash.c index 9f9428e4bf0..f9687a6e073 100644 --- a/src/lib/hash.c +++ b/src/lib/util/hash.c @@ -15,7 +15,7 @@ */ /** - * @file lib/hash.c + * @file lib/util/hash.c * @brief Resizable hash tables. * * The weird "reverse" function is based on an idea from diff --git a/src/lib/heap.c b/src/lib/util/heap.c similarity index 99% rename from src/lib/heap.c rename to src/lib/util/heap.c index e260ee0c2bc..fcfabe10168 100644 --- a/src/lib/heap.c +++ b/src/lib/util/heap.c @@ -15,7 +15,7 @@ */ /** - * @file lib/heap.c + * @file lib/util/heap.c * @brief Basic heap * @copyright 2005,2006 The FreeRADIUS server project */ diff --git a/src/lib/hmacmd5.c b/src/lib/util/hmacmd5.c similarity index 99% rename from src/lib/hmacmd5.c rename to src/lib/util/hmacmd5.c index ed98228061d..056f0977edb 100644 --- a/src/lib/hmacmd5.c +++ b/src/lib/util/hmacmd5.c @@ -15,7 +15,7 @@ */ /** - * @file lib/hmacmd5.c + * @file lib/util/hmacmd5.c * @brief MD5 HMAC not dependent on OpenSSL. * * @note New code that needs fast or incremental HMACs should use the OpenSSL EVP_* HMAC diff --git a/src/lib/hmacsha1.c b/src/lib/util/hmacsha1.c similarity index 99% rename from src/lib/hmacsha1.c rename to src/lib/util/hmacsha1.c index 46bfc30f758..fe02ef98078 100644 --- a/src/lib/hmacsha1.c +++ b/src/lib/util/hmacsha1.c @@ -15,7 +15,7 @@ */ /** - * @file lib/hmacsha1.c + * @file lib/util/hmacsha1.c * @brief SHA1 HMAC not dependent on OpenSSL. * * @note New code that needs fast or incremental HMACs should use the OpenSSL EVP_* HMAC diff --git a/src/lib/inet.c b/src/lib/util/inet.c similarity index 100% rename from src/lib/inet.c rename to src/lib/util/inet.c diff --git a/src/lib/isaac.c b/src/lib/util/isaac.c similarity index 100% rename from src/lib/isaac.c rename to src/lib/util/isaac.c diff --git a/src/lib/log.c b/src/lib/util/log.c similarity index 99% rename from src/lib/log.c rename to src/lib/util/log.c index efadd438a15..125a0c0adbc 100644 --- a/src/lib/log.c +++ b/src/lib/util/log.c @@ -15,7 +15,7 @@ */ /** - * @file lib/log.c + * @file lib/util/log.c * @brief Support functions for logging in FreeRADIUS libraries. * * @copyright 2003,2006 The FreeRADIUS server project diff --git a/src/lib/md4.c b/src/lib/util/md4.c similarity index 100% rename from src/lib/md4.c rename to src/lib/util/md4.c diff --git a/src/lib/md5.c b/src/lib/util/md5.c similarity index 100% rename from src/lib/md5.c rename to src/lib/util/md5.c diff --git a/src/lib/misc.c b/src/lib/util/misc.c similarity index 100% rename from src/lib/misc.c rename to src/lib/util/misc.c diff --git a/src/lib/missing.c b/src/lib/util/missing.c similarity index 100% rename from src/lib/missing.c rename to src/lib/util/missing.c diff --git a/src/lib/net.c b/src/lib/util/net.c similarity index 100% rename from src/lib/net.c rename to src/lib/util/net.c diff --git a/src/lib/packet.c b/src/lib/util/packet.c similarity index 100% rename from src/lib/packet.c rename to src/lib/util/packet.c diff --git a/src/lib/pair.c b/src/lib/util/pair.c similarity index 100% rename from src/lib/pair.c rename to src/lib/util/pair.c diff --git a/src/lib/pair_cursor.c b/src/lib/util/pair_cursor.c similarity index 99% rename from src/lib/pair_cursor.c rename to src/lib/util/pair_cursor.c index cfc7f2704c8..322e7bb20fc 100644 --- a/src/lib/pair_cursor.c +++ b/src/lib/util/pair_cursor.c @@ -16,7 +16,7 @@ /** * $Id$ * - * @file lib/cursor.c + * @file lib/util/cursor.c * @brief Functions to iterate over collections of VALUE_PAIRs * * @note Do not modify collections of VALUE_PAIRs pointed to by a cursor diff --git a/src/lib/pcap.c b/src/lib/util/pcap.c similarity index 99% rename from src/lib/pcap.c rename to src/lib/util/pcap.c index dae00369409..34bc9e5613a 100644 --- a/src/lib/pcap.c +++ b/src/lib/util/pcap.c @@ -15,7 +15,7 @@ /** * $Id$ - * @file lib/pcap.c + * @file lib/util/pcap.c * @brief Wrappers around libpcap functions * * @author Arran Cudbard-Bell diff --git a/src/lib/print.c b/src/lib/util/print.c similarity index 100% rename from src/lib/print.c rename to src/lib/util/print.c diff --git a/src/lib/proto.c b/src/lib/util/proto.c similarity index 100% rename from src/lib/proto.c rename to src/lib/util/proto.c diff --git a/src/lib/radius.c b/src/lib/util/radius.c similarity index 100% rename from src/lib/radius.c rename to src/lib/util/radius.c diff --git a/src/lib/radius_decode.c b/src/lib/util/radius_decode.c similarity index 100% rename from src/lib/radius_decode.c rename to src/lib/util/radius_decode.c diff --git a/src/lib/radius_encode.c b/src/lib/util/radius_encode.c similarity index 100% rename from src/lib/radius_encode.c rename to src/lib/util/radius_encode.c diff --git a/src/lib/rbtree.c b/src/lib/util/rbtree.c similarity index 100% rename from src/lib/rbtree.c rename to src/lib/util/rbtree.c diff --git a/src/lib/regex.c b/src/lib/util/regex.c similarity index 99% rename from src/lib/regex.c rename to src/lib/util/regex.c index f6e56892ca8..59a129d435c 100644 --- a/src/lib/regex.c +++ b/src/lib/util/regex.c @@ -15,7 +15,7 @@ */ /** - * @file lib/regex.c + * @file lib/util/regex.c * @brief regex abstraction functions * * @copyright 2014 The FreeRADIUS server project diff --git a/src/lib/sha1.c b/src/lib/util/sha1.c similarity index 99% rename from src/lib/sha1.c rename to src/lib/util/sha1.c index 59545bb6f5e..0eba9fe2c93 100644 --- a/src/lib/sha1.c +++ b/src/lib/util/sha1.c @@ -10,7 +10,7 @@ RCSID("$Id$") #include -#include "../include/sha1.h" +#include "../../include/sha1.h" #ifndef WITH_OPENSSL_SHA1 # define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) diff --git a/src/lib/snprintf.c b/src/lib/util/snprintf.c similarity index 100% rename from src/lib/snprintf.c rename to src/lib/util/snprintf.c diff --git a/src/lib/snprintf.h b/src/lib/util/snprintf.h similarity index 100% rename from src/lib/snprintf.h rename to src/lib/util/snprintf.h diff --git a/src/lib/socket.c b/src/lib/util/socket.c similarity index 100% rename from src/lib/socket.c rename to src/lib/util/socket.c diff --git a/src/lib/strerror.c b/src/lib/util/strerror.c similarity index 99% rename from src/lib/strerror.c rename to src/lib/util/strerror.c index 7f882d2aa31..f21ff1281a8 100644 --- a/src/lib/strerror.c +++ b/src/lib/util/strerror.c @@ -15,7 +15,7 @@ */ /** - * @file lib/strerror.c + * @file lib/util/strerror.c * @brief Support functions to allow libraries to provide errors to their callers. * * @copyright 2017 The FreeRADIUS server project diff --git a/src/lib/strlcat.c b/src/lib/util/strlcat.c similarity index 100% rename from src/lib/strlcat.c rename to src/lib/util/strlcat.c diff --git a/src/lib/strlcpy.c b/src/lib/util/strlcpy.c similarity index 100% rename from src/lib/strlcpy.c rename to src/lib/util/strlcpy.c diff --git a/src/lib/syserror.c b/src/lib/util/syserror.c similarity index 99% rename from src/lib/syserror.c rename to src/lib/util/syserror.c index 07ae0e9b7f5..3c66e6b3e7d 100644 --- a/src/lib/syserror.c +++ b/src/lib/util/syserror.c @@ -15,7 +15,7 @@ */ /** - * @file lib/syserror.c + * @file lib/util/syserror.c * @brief Support functions to allow libraries to get system errors in a threadsafe * and easily debuggable way. * diff --git a/src/lib/tcp.c b/src/lib/util/tcp.c similarity index 100% rename from src/lib/tcp.c rename to src/lib/util/tcp.c diff --git a/src/lib/token.c b/src/lib/util/token.c similarity index 100% rename from src/lib/token.c rename to src/lib/util/token.c diff --git a/src/lib/udp.c b/src/lib/util/udp.c similarity index 100% rename from src/lib/udp.c rename to src/lib/util/udp.c diff --git a/src/lib/udpfromto.c b/src/lib/util/udpfromto.c similarity index 100% rename from src/lib/udpfromto.c rename to src/lib/util/udpfromto.c diff --git a/src/lib/value.c b/src/lib/util/value.c similarity index 100% rename from src/lib/value.c rename to src/lib/util/value.c diff --git a/src/lib/version.c b/src/lib/util/version.c similarity index 87% rename from src/lib/version.c rename to src/lib/util/version.c index f5bb64dd25f..c30e304d7c7 100644 --- a/src/lib/version.c +++ b/src/lib/util/version.c @@ -38,21 +38,21 @@ static uint64_t libmagic = RADIUSD_MAGIC_NUMBER; int fr_check_lib_magic(uint64_t magic) { if (MAGIC_PREFIX(magic) != MAGIC_PREFIX(libmagic)) { - fr_strerror_printf("Application and libfreeradius-radius magic number (prefix) mismatch." + fr_strerror_printf("Application and libfreeradius-util magic number (prefix) mismatch." " application: %x library: %x", MAGIC_PREFIX(magic), MAGIC_PREFIX(libmagic)); return -1; } if (MAGIC_VERSION(magic) != MAGIC_VERSION(libmagic)) { - fr_strerror_printf("Application and libfreeradius-radius magic number (version) mismatch." + fr_strerror_printf("Application and libfreeradius-util magic number (version) mismatch." " application: %lx library: %lx", (unsigned long) MAGIC_VERSION(magic), (unsigned long) MAGIC_VERSION(libmagic)); return -2; } if (MAGIC_COMMIT(magic) != MAGIC_COMMIT(libmagic)) { - fr_strerror_printf("Application and libfreeradius-radius magic number (commit) mismatch." + fr_strerror_printf("Application and libfreeradius-util magic number (commit) mismatch." " application: %lx library: %lx", (unsigned long) MAGIC_COMMIT(magic), (unsigned long) MAGIC_COMMIT(libmagic)); return -3; diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk index aeed8afda6d..aa041aa7d9e 100644 --- a/src/main/libfreeradius-server.mk +++ b/src/main/libfreeradius-server.mk @@ -3,6 +3,7 @@ TARGET := libfreeradius-server.a SOURCES := cond_eval.c \ cond_tokenize.c \ conf_file.c \ + conf_eval.c \ connection.c \ dl.c \ exec.c \ @@ -23,7 +24,7 @@ SOURCES := cond_eval.c \ # This lets the linker determine which version of the SSLeay functions to use. TGT_LDLIBS := $(LIBS) $(OPENSSL_LIBS) $(GPERFTOOLS_FLAGS) $(GPERFTOOLS_LIBS) -TGT_PREREQS := libfreeradius-radius.la +TGT_PREREQS := libfreeradius-util.la ifneq ($(MAKECMDGOALS),scan) SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\" diff --git a/src/main/radclient.mk b/src/main/radclient.mk index 0db0a8af07d..79c372e7527 100644 --- a/src/main/radclient.mk +++ b/src/main/radclient.mk @@ -2,7 +2,7 @@ TARGET := radclient SOURCES := radclient.c ${top_srcdir}/src/modules/rlm_mschap/smbdes.c \ ${top_srcdir}/src/modules/rlm_mschap/mschap.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a SRC_CFLAGS := -I${top_srcdir}/src/modules/rlm_mschap TGT_LDLIBS := $(LIBS) diff --git a/src/main/radiusd.mk b/src/main/radiusd.mk index 694482c271a..c2360ea929e 100644 --- a/src/main/radiusd.mk +++ b/src/main/radiusd.mk @@ -31,7 +31,7 @@ SRC_CFLAGS := TGT_INSTALLDIR := ${sbindir} TGT_LDLIBS := $(LIBS) $(LCRYPT) $(SYSTEMD_LIBS) TGT_LDFLAGS := $(LDFLAGS) $(SYSTEMD_LDFLAGS) -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a # Libraries can't depend on libraries (oops), so make the binary # depend on the EAP code... diff --git a/src/main/radmin.mk b/src/main/radmin.mk index cd71456dc02..60de2f936bc 100644 --- a/src/main/radmin.mk +++ b/src/main/radmin.mk @@ -7,5 +7,5 @@ endif SOURCES := radmin.c conduit.c TGT_INSTALLDIR := ${sbindir} -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a TGT_LDLIBS := $(LIBS) $(LIBREADLINE) diff --git a/src/main/radsniff.mk.in b/src/main/radsniff.mk.in index 3de7ebc9b3e..9d7c4bb50fb 100644 --- a/src/main/radsniff.mk.in +++ b/src/main/radsniff.mk.in @@ -8,6 +8,6 @@ endif SOURCES := radsniff.c collectd.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a TGT_LDLIBS := $(LIBS) $(PCAP_LIBS) $(COLLECTDC_LIBS) TGT_LDFLAGS := $(LDFLAGS) $(PCAP_LDFLAGS) $(COLLECTDC_LDFLAGS) diff --git a/src/main/radsnmp.mk b/src/main/radsnmp.mk index f7715e5bf5f..958d2f9b3f1 100644 --- a/src/main/radsnmp.mk +++ b/src/main/radsnmp.mk @@ -1,6 +1,6 @@ TARGET := radsnmp SOURCES := radsnmp.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a TGT_LDLIBS := $(LIBS) diff --git a/src/main/radwho.mk b/src/main/radwho.mk index 5d9a92acc9e..fc610d07b5b 100644 --- a/src/main/radwho.mk +++ b/src/main/radwho.mk @@ -1,5 +1,5 @@ TARGET := radwho SOURCES := radwho.c -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a TGT_LDLIBS := $(LIBS) diff --git a/src/main/unit_test_attribute.mk b/src/main/unit_test_attribute.mk index 6ce0135e395..c79249ac6d8 100644 --- a/src/main/unit_test_attribute.mk +++ b/src/main/unit_test_attribute.mk @@ -1,5 +1,5 @@ TARGET := unit_test_attribute SOURCES := unit_test_attribute.c -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a libfreeradius-dhcp.a libfreeradius-tacacs.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a libfreeradius-dhcp.a libfreeradius-tacacs.a TGT_LDLIBS := $(LIBS) diff --git a/src/main/unit_test_map.mk b/src/main/unit_test_map.mk index 68ec21ffe3e..bd20bd98120 100644 --- a/src/main/unit_test_map.mk +++ b/src/main/unit_test_map.mk @@ -1,5 +1,5 @@ TARGET := unit_test_map SOURCES := unit_test_map.c ${top_srcdir}/src/main/unlang_compile.c ${top_srcdir}/src/main/unlang_interpret.c -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a TGT_LDLIBS := $(LIBS) diff --git a/src/main/unit_test_module.mk b/src/main/unit_test_module.mk index dbbf9532d81..d7985656483 100644 --- a/src/main/unit_test_module.mk +++ b/src/main/unit_test_module.mk @@ -23,7 +23,7 @@ endif TGT_INSTALLDIR := TGT_LDLIBS := $(LIBS) $(LCRYPT) -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a # Libraries can't depend on libraries (oops), so make the binary # depend on the EAP code... diff --git a/src/main/util.c b/src/main/util.c index 54e5c63891e..bddeb5ba7ce 100644 --- a/src/main/util.c +++ b/src/main/util.c @@ -457,25 +457,6 @@ char *rad_ajoin(TALLOC_CTX *ctx, char const **argv, int argc, char c) return buff; } -/* - * Logs an error message and aborts the program - * - */ -#ifndef NDEBUG -bool rad_assert_fail(char const *file, unsigned int line, char const *expr) -{ - ERROR("ASSERT FAILED %s[%u]: %s", file, line, expr); - fr_fault(SIGABRT); - fr_exit_now(1); -} -#else -bool rad_assert_fail(char const *file, unsigned int line, char const *expr) -{ - ERROR("ASSERT WOULD FAIL %s[%u]: %s", file, line, expr); - return false; -} -#endif - /* * Copy a quoted string. */ diff --git a/src/modules/proto_arp/all.mk b/src/modules/proto_arp/all.mk index 4bd9cac8218..3fe90a8cc9c 100644 --- a/src/modules/proto_arp/all.mk +++ b/src/modules/proto_arp/all.mk @@ -8,5 +8,5 @@ TARGET := $(TARGETNAME).a endif SOURCES := proto_arp.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a TGT_LDLIBS := $(PCAP_LIBS) diff --git a/src/modules/proto_detail/all.mk b/src/modules/proto_detail/all.mk index 3a1aaf51c17..ce8b4bc5213 100644 --- a/src/modules/proto_detail/all.mk +++ b/src/modules/proto_detail/all.mk @@ -6,4 +6,4 @@ endif SOURCES := proto_detail.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a diff --git a/src/modules/proto_dhcp/dhcpclient.mk b/src/modules/proto_dhcp/dhcpclient.mk index 4266670d0f7..cecfdf4026b 100644 --- a/src/modules/proto_dhcp/dhcpclient.mk +++ b/src/modules/proto_dhcp/dhcpclient.mk @@ -1,5 +1,5 @@ TARGET := dhcpclient SOURCES := dhcpclient.c dhcp.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a TGT_LDLIBS := $(LIBS) diff --git a/src/modules/proto_radius/proto_radius_acct.mk b/src/modules/proto_radius/proto_radius_acct.mk index 9e2c09c3610..acc9376ef8f 100644 --- a/src/modules/proto_radius/proto_radius_acct.mk +++ b/src/modules/proto_radius/proto_radius_acct.mk @@ -6,5 +6,5 @@ endif SOURCES := proto_radius_acct.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a diff --git a/src/modules/proto_radius/proto_radius_auth.mk b/src/modules/proto_radius/proto_radius_auth.mk index d68ebd4c18e..8bc80b8dc81 100644 --- a/src/modules/proto_radius/proto_radius_auth.mk +++ b/src/modules/proto_radius/proto_radius_auth.mk @@ -6,5 +6,5 @@ endif SOURCES := proto_radius_auth.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a diff --git a/src/modules/proto_radius/proto_radius_coa.mk b/src/modules/proto_radius/proto_radius_coa.mk index 6ad2bd78b71..31044744280 100644 --- a/src/modules/proto_radius/proto_radius_coa.mk +++ b/src/modules/proto_radius/proto_radius_coa.mk @@ -6,5 +6,5 @@ endif SOURCES := proto_radius_coa.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a diff --git a/src/modules/proto_radius/proto_radius_status.mk b/src/modules/proto_radius/proto_radius_status.mk index 10228f6c949..5ec66049ac7 100644 --- a/src/modules/proto_radius/proto_radius_status.mk +++ b/src/modules/proto_radius/proto_radius_status.mk @@ -6,5 +6,5 @@ endif SOURCES := proto_radius_status.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a diff --git a/src/modules/rlm_dict/README.md b/src/modules/rlm_dict/README.md index 6f75e6f5081..05eddb4a036 100644 --- a/src/modules/rlm_dict/README.md +++ b/src/modules/rlm_dict/README.md @@ -5,4 +5,8 @@ ## Summary +<<<<<<< Updated upstream Registers xlats to access dictionary data +======= +Registers xlats and maps to access dictionary data +>>>>>>> Stashed changes diff --git a/src/modules/rlm_ldap/.gitignore b/src/modules/rlm_ldap/.gitignore deleted file mode 100644 index 8e5e021c7f8..00000000000 --- a/src/modules/rlm_ldap/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -all.mk -libfreeradius-ldap.mk diff --git a/src/modules/rlm_ldap/rlm_ldap.mk b/src/modules/rlm_ldap/all.mk similarity index 65% rename from src/modules/rlm_ldap/rlm_ldap.mk rename to src/modules/rlm_ldap/all.mk index 9c442e47c27..647f68a7cad 100644 --- a/src/modules/rlm_ldap/rlm_ldap.mk +++ b/src/modules/rlm_ldap/all.mk @@ -2,14 +2,14 @@ # might not always be available, and the TARGETNAME from the previous # target may stick around. TARGETNAME= --include $(top_builddir)/src/modules/rlm_ldap/libfreeradius-ldap.mk +-include $(top_builddir)/src/lib/ldap/all.mk ifneq "${TARGETNAME}" "" TARGETNAME := rlm_ldap - TARGET := $(TARGETNAME).a + TARGET := $(TARGETNAME).a endif -SOURCES := $(TARGETNAME).c attrmap.c clients.c conn.c groups.c user.c +SOURCES := $(TARGETNAME).c attrmap.c clients.c conn.c groups.c user.c SRC_CFLAGS += -I$(top_builddir)/src/modules/rlm_ldap TGT_PREREQS := libfreeradius-ldap.a diff --git a/src/modules/rlm_ldap/all.mk.in b/src/modules/rlm_ldap/all.mk.in deleted file mode 100644 index fa7a27fa46c..00000000000 --- a/src/modules/rlm_ldap/all.mk.in +++ /dev/null @@ -1 +0,0 @@ -SUBMAKEFILES := libfreeradius-ldap.mk rlm_ldap.mk diff --git a/src/modules/rlm_ldap/attrmap.c b/src/modules/rlm_ldap/attrmap.c index 45bd3948995..0bb0c44ded2 100644 --- a/src/modules/rlm_ldap/attrmap.c +++ b/src/modules/rlm_ldap/attrmap.c @@ -16,7 +16,7 @@ /** * $Id$ - * @file ldap.c + * @file attrmap.c * @brief Functions for mapping between LDAP and FreeRADIUS attributes. * * @author Arran Cudbard-Bell diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index b117595bb76..85549764878 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -1002,9 +1002,9 @@ static rlm_rcode_t mod_authorize(void *instance, UNUSED void *thread, REQUEST *r /* * Retrive universal password */ - res = nmasldap_get_password(conn->handle, dn, password, &pass_size); + res = fr_ldap_edir_get_password(conn->handle, dn, password, &pass_size); if (res != 0) { - REDEBUG("Failed to retrieve eDirectory password: (%i) %s", res, edir_errstr(res)); + REDEBUG("Failed to retrieve eDirectory password: (%i) %s", res, fr_ldap_edir_errstr(res)); rcode = RLM_MODULE_FAIL; goto finish; diff --git a/src/modules/rlm_ldap/rlm_ldap.h b/src/modules/rlm_ldap/rlm_ldap.h index 43c2d0aab4d..313b8a9a4f1 100644 --- a/src/modules/rlm_ldap/rlm_ldap.h +++ b/src/modules/rlm_ldap/rlm_ldap.h @@ -17,7 +17,7 @@ #include #include -#include "libldap.h" +#include typedef struct ldap_inst_s rlm_ldap_t; @@ -224,12 +224,4 @@ int rlm_ldap_map_do(rlm_ldap_t const *inst, REQUEST *request, LDAP *handle, * clients.c - Dynamic clients (bulk load). */ int rlm_ldap_client_load(rlm_ldap_t const *inst, CONF_SECTION *tmpl, CONF_SECTION *cs); - -/* - * edir.c - Magic extensions for Novell - */ -int nmasldap_get_password(LDAP *ld, char const *dn, char *password, size_t *len); - -char const *edir_errstr(int code); - #endif diff --git a/src/modules/rlm_mschap/smbencrypt.mk b/src/modules/rlm_mschap/smbencrypt.mk index f7895fc85fc..cb59241ea88 100644 --- a/src/modules/rlm_mschap/smbencrypt.mk +++ b/src/modules/rlm_mschap/smbencrypt.mk @@ -1,7 +1,7 @@ TARGET := smbencrypt SOURCES := smbencrypt.c smbdes.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a SRC_CFLAGS := TGT_LDLIBS := $(LIBS) diff --git a/src/modules/rlm_redis/rlm_redis.mk b/src/modules/rlm_redis/rlm_redis.mk index 62ec6a28f88..8ffa8753429 100644 --- a/src/modules/rlm_redis/rlm_redis.mk +++ b/src/modules/rlm_redis/rlm_redis.mk @@ -6,10 +6,10 @@ TARGETNAME= ifneq "${TARGETNAME}" "" TARGETNAME := rlm_redis - TARGET := $(TARGETNAME).a + TARGET := $(TARGETNAME).a endif -SOURCES := $(TARGETNAME).c +SOURCES := $(TARGETNAME).c SRC_CFLAGS += -I$(top_builddir)/src/modules/rlm_redis TGT_PREREQS := libfreeradius-redis.a diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.mk b/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.mk index 52ac4084d4e..83df84482cd 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.mk +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool_tool.mk @@ -12,7 +12,7 @@ endif SOURCES := $(TARGETNAME).c SRC_CFLAGS += -I$(top_builddir)/src/modules/rlm_redis -TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a libfreeradius-redis.a +TGT_PREREQS := libfreeradius-server.a libfreeradius-util.a libfreeradius-redis.a TGT_LDLIBS += $(TALLOC_LIBS) MAN := rlm_redis_ippool_tool.8 diff --git a/src/tests/rbmonkey.mk b/src/tests/rbmonkey.mk index ecf5e068c89..71ee633bc9d 100644 --- a/src/tests/rbmonkey.mk +++ b/src/tests/rbmonkey.mk @@ -2,6 +2,6 @@ TARGET := rbmonkey SOURCES := rbmonkey.c -TGT_PREREQS := libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a TGT_LDLIBS := $(LIBS) TGT_INSTALLDIR := diff --git a/src/tests/util/atomic_queue_test.c b/src/tests/util/atomic_queue_test.c index 8ac4ca95824..e04f48f97cf 100644 --- a/src/tests/util/atomic_queue_test.c +++ b/src/tests/util/atomic_queue_test.c @@ -22,7 +22,7 @@ RCSID("$Id$") -#include +#include #include #include #include diff --git a/src/tests/util/atomic_queue_test.mk b/src/tests/util/atomic_queue_test.mk index 83ab85dce30..5b641294df9 100644 --- a/src/tests/util/atomic_queue_test.mk +++ b/src/tests/util/atomic_queue_test.mk @@ -2,6 +2,6 @@ TARGET := atomic_queue_test SOURCES := atomic_queue_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/channel_test.c b/src/tests/util/channel_test.c index f2e92b13fd1..80fca30e5b4 100644 --- a/src/tests/util/channel_test.c +++ b/src/tests/util/channel_test.c @@ -22,8 +22,8 @@ RCSID("$Id$") -#include -#include +#include +#include #include #ifdef HAVE_GETOPT_H diff --git a/src/tests/util/channel_test.mk b/src/tests/util/channel_test.mk index bdfb79e306b..7bf21257005 100644 --- a/src/tests/util/channel_test.mk +++ b/src/tests/util/channel_test.mk @@ -2,6 +2,6 @@ TARGET := channel_test SOURCES := channel_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/control_test.c b/src/tests/util/control_test.c index 00b7b9dd481..6dc4b54bcf5 100644 --- a/src/tests/util/control_test.c +++ b/src/tests/util/control_test.c @@ -22,8 +22,8 @@ RCSID("$Id$") -#include -#include +#include +#include #include #include diff --git a/src/tests/util/control_test.mk b/src/tests/util/control_test.mk index 20939c5a283..820965aa134 100644 --- a/src/tests/util/control_test.mk +++ b/src/tests/util/control_test.mk @@ -2,6 +2,6 @@ TARGET := control_test SOURCES := control_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/message_set_test.c b/src/tests/util/message_set_test.c index 67d0c05c725..9ea724739ff 100644 --- a/src/tests/util/message_set_test.c +++ b/src/tests/util/message_set_test.c @@ -22,7 +22,7 @@ RCSID("$Id$") -#include +#include #include #include #include diff --git a/src/tests/util/message_set_test.mk b/src/tests/util/message_set_test.mk index 28e149d5534..d9bdc5357bb 100644 --- a/src/tests/util/message_set_test.mk +++ b/src/tests/util/message_set_test.mk @@ -2,6 +2,6 @@ TARGET := message_set_test SOURCES := message_set_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/radius1_test.c b/src/tests/util/radius1_test.c index d99644517a1..5304265d931 100644 --- a/src/tests/util/radius1_test.c +++ b/src/tests/util/radius1_test.c @@ -22,8 +22,8 @@ RCSID("$Id$") -#include -#include +#include +#include #include #include #include diff --git a/src/tests/util/radius1_test.mk b/src/tests/util/radius1_test.mk index 89b2ccce321..7dd87d42b77 100644 --- a/src/tests/util/radius1_test.mk +++ b/src/tests/util/radius1_test.mk @@ -2,5 +2,5 @@ TARGET := radius1_test SOURCES := radius1_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/radius_schedule_test.c b/src/tests/util/radius_schedule_test.c index 44ea5317717..6629e4bc7bc 100644 --- a/src/tests/util/radius_schedule_test.c +++ b/src/tests/util/radius_schedule_test.c @@ -22,7 +22,7 @@ RCSID("$Id$") -#include +#include #include #include #include diff --git a/src/tests/util/radius_schedule_test.mk b/src/tests/util/radius_schedule_test.mk index 57967f8ed82..fda96702a39 100644 --- a/src/tests/util/radius_schedule_test.mk +++ b/src/tests/util/radius_schedule_test.mk @@ -2,6 +2,6 @@ TARGET := radius_schedule_test SOURCES := radius_schedule_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/ring_buffer_test.c b/src/tests/util/ring_buffer_test.c index 7b9942682f3..99829a453ef 100644 --- a/src/tests/util/ring_buffer_test.c +++ b/src/tests/util/ring_buffer_test.c @@ -22,7 +22,7 @@ RCSID("$Id$") -#include +#include #include #include #include diff --git a/src/tests/util/ring_buffer_test.mk b/src/tests/util/ring_buffer_test.mk index a7bbc5c65bc..44e238cddf2 100644 --- a/src/tests/util/ring_buffer_test.mk +++ b/src/tests/util/ring_buffer_test.mk @@ -2,6 +2,6 @@ TARGET := ring_buffer_test SOURCES := ring_buffer_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/schedule_test.c b/src/tests/util/schedule_test.c index c79f71909fc..548612bd65d 100644 --- a/src/tests/util/schedule_test.c +++ b/src/tests/util/schedule_test.c @@ -22,8 +22,8 @@ RCSID("$Id$") -#include -#include +#include +#include #include #include #include diff --git a/src/tests/util/schedule_test.mk b/src/tests/util/schedule_test.mk index f4225a5570f..e014a2e0779 100644 --- a/src/tests/util/schedule_test.mk +++ b/src/tests/util/schedule_test.mk @@ -2,6 +2,6 @@ TARGET := schedule_test SOURCES := schedule_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS) diff --git a/src/tests/util/worker_test.c b/src/tests/util/worker_test.c index d8b1e1a6ced..5b764da5db0 100644 --- a/src/tests/util/worker_test.c +++ b/src/tests/util/worker_test.c @@ -22,8 +22,8 @@ RCSID("$Id$") -#include -#include +#include +#include #include #ifdef HAVE_GETOPT_H diff --git a/src/tests/util/worker_test.mk b/src/tests/util/worker_test.mk index 27a7f56da02..2b55717b3f8 100644 --- a/src/tests/util/worker_test.mk +++ b/src/tests/util/worker_test.mk @@ -2,6 +2,6 @@ TARGET := worker_test SOURCES := worker_test.c -TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-radius.a +TGT_PREREQS := libfreeradius-util.a libfreeradius-server.a libfreeradius-io.a TGT_LDLIBS := $(LIBS)