mirror of https://framagit.org/bortzmeyer/echoping
parent
5b3b44da62
commit
fa09c1a5ca
@ -1,31 +1,15 @@
|
||||
CCFLAGS=-DHAVE_CONFIG_H -Wall -O0 -g
|
||||
CCDYNAMICFLAGS=${CCFLAGS} -fPIC
|
||||
LDFLAGS=
|
||||
LDDYNAMICFLAGS=${LDFLAGS} -shared -lpq -lresolv # TODO: add the flags only when necessary
|
||||
|
||||
PLUGINS=random.so whois.so postgres dns.so
|
||||
|
||||
all: $(PLUGINS)
|
||||
|
||||
postgres: postgresql.so
|
||||
|
||||
%.o: %.c
|
||||
${CC} ${CCDYNAMICFLAGS} -c -o $@ $<
|
||||
|
||||
%.so: %.o
|
||||
${CC} ${LDDYNAMICFLAGS} -o $@ $<
|
||||
|
||||
test-postgresql: test-postgresql.o
|
||||
${CC} -o $@ -l pq $<
|
||||
|
||||
clean:
|
||||
-rm -f *.o *.so program
|
||||
|
||||
distclean: clean
|
||||
-rm -f *~
|
||||
|
||||
.SECONDARY: ${OBJECTS}
|
||||
|
||||
# $Id$
|
||||
|
||||
|
||||
SUBDIRS=@subdirs@
|
||||
|
||||
all:
|
||||
ifneq (${SUBDIRS},)
|
||||
@for subdir in ${SUBDIRS}; do \
|
||||
(cd $$subdir && ${MAKE} HAVE_CONFIG_H=1 $@) \
|
||||
done
|
||||
endif
|
||||
|
||||
install:
|
||||
ifneq (${SUBDIRS},)
|
||||
@for subdir in ${SUBDIRS}; do \
|
||||
(cd $$subdir && ${MAKE} $@) \
|
||||
done
|
||||
endif
|
||||
|
@ -0,0 +1,30 @@
|
||||
CCFLAGS=-DHAVE_CONFIG_H -Wall -O0 -g
|
||||
CCDYNAMICFLAGS=${CCFLAGS} -fPIC
|
||||
LDFLAGS=
|
||||
LDDYNAMICFLAGS=${LDFLAGS} -shared
|
||||
# Autoconf variables
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
DESTDIR=@libdir@/echoping
|
||||
INSTALL=@INSTALL@
|
||||
|
||||
%.o: %.c
|
||||
${CC} ${CCDYNAMICFLAGS} -c -o $@ $<
|
||||
|
||||
%.so: %.o
|
||||
${CC} ${LDDYNAMICFLAGS} -o $@ $<
|
||||
|
||||
prepare-install:
|
||||
@if [ ! -d ${DESTDIR} ]; then \
|
||||
mkdir ${DESTDIR}; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
-rm -f *.o *.so
|
||||
|
||||
distclean: clean
|
||||
-rm -f *~
|
||||
|
||||
# $Id$
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,7 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(random.c)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_INIT(Makefile.plugins.in)
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_CHECK_FUNCS(usleep)
|
||||
AC_OUTPUT(Makefile)
|
||||
AC_CONFIG_SUBDIRS(random whois dns postgresql)
|
||||
AC_OUTPUT(Makefile.plugins Makefile)
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
PLUGIN=dns.so
|
||||
include ../Makefile.plugins
|
||||
|
||||
ifeq (@DNS_BUILD@,1)
|
||||
all: ${PLUGIN}
|
||||
else
|
||||
all:
|
||||
@echo "Not building the DNS plugin"
|
||||
endif
|
||||
|
||||
ifeq (@DNS_BUILD@,1)
|
||||
install: all prepare-install
|
||||
${INSTALL} ${PLUGIN} ${DESTDIR}
|
||||
else
|
||||
all:
|
||||
@echo "Not installing the DNS plugin"
|
||||
endif
|
||||
|
||||
# $Id$
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `popt' library (-lpopt). */
|
||||
#undef HAVE_LIBPOPT
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the `poptGetContext' function. */
|
||||
#undef HAVE_POPTGETCONTEXT
|
||||
|
||||
/* Define to 1 if you have the `res_init' function. */
|
||||
#undef HAVE_RES_INIT
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(dns.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
DNS_BUILD=1
|
||||
AC_CHECK_FUNCS(poptGetContext,,
|
||||
[AC_CHECK_LIB(popt,poptGetContext,,[AC_MSG_WARN([No popt development environment found, not building this plugin]) && DNS_BUILD=0])])
|
||||
if test "$DNS_BUILD" != "0"; then
|
||||
AC_CHECK_FUNCS(res_init, ,
|
||||
dnl Some Unices has res_init but has it renamed in libc as something else so we
|
||||
dnl must include <resolv.h> to get the redefinition. (Stolen from rsync)
|
||||
dnl autoconf AC_CHECK_FUNCS does not allow headers to be easily included :-(
|
||||
[AC_MSG_CHECKING([$ac_func again by including <resolv.h>])
|
||||
LIBS=-lresolv AC_TRY_LINK([#include <resolv.h>
|
||||
],
|
||||
[$ac_func();],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_WARN([No DNS resolver development environment found, not building this plugin]) && DNS_BUILD=0]
|
||||
)])
|
||||
fi
|
||||
|
||||
AC_SUBST(DNS_BUILD,$DNS_BUILD)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
@ -0,0 +1,23 @@
|
||||
PLUGIN=postgresql.so
|
||||
|
||||
include ../Makefile.plugins
|
||||
|
||||
ifeq (@PGSQL_BUILD@,1)
|
||||
all: ${PLUGIN}
|
||||
else
|
||||
all:
|
||||
@echo "Not building the PostgreSQL plugin"
|
||||
endif
|
||||
|
||||
ifeq (@PGSQL_BUILD@,1)
|
||||
install: all prepare-install
|
||||
${INSTALL} ${PLUGIN} ${DESTDIR}
|
||||
else
|
||||
all:
|
||||
@echo "Not installing the PostgreSQL plugin"
|
||||
endif
|
||||
|
||||
|
||||
# $Id$
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `popt' library (-lpopt). */
|
||||
#undef HAVE_LIBPOPT
|
||||
|
||||
/* Define to 1 if you have the `poptGetContext' function. */
|
||||
#undef HAVE_POPTGETCONTEXT
|
||||
|
||||
/* Define to 1 if you have the `PQconnectdb' function. */
|
||||
#undef HAVE_PQCONNECTDB
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
@ -0,0 +1,20 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(postgresql.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
PGSQL_BUILD=1
|
||||
AC_CHECK_FUNCS(poptGetContext,,
|
||||
[AC_CHECK_LIB(popt,poptGetContext,,[AC_MSG_WARN([No popt development environment found, not building this plugin]) && PGSQL_BUILD=0])])
|
||||
if test "$PGSQL_BUILD" != "0"; then
|
||||
AC_CHECK_FUNCS(PQconnectdb, ,
|
||||
[AC_CHECK_LIB(pq,PQconnectdb,,
|
||||
[AC_MSG_WARN([No PostgreSQL development environment found, not building this plugin]) && PGSQL_BUILD=0])])
|
||||
fi
|
||||
AC_SUBST(PGSQL_BUILD,$PGSQL_BUILD)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
@ -0,0 +1,22 @@
|
||||
PLUGIN=random.so
|
||||
|
||||
include ../Makefile.plugins
|
||||
|
||||
ifeq (@RANDOM_BUILD@,1)
|
||||
all: ${PLUGIN}
|
||||
else
|
||||
all:
|
||||
@echo "Not building the random plugin"
|
||||
endif
|
||||
|
||||
ifeq (@RANDOM_BUILD@,1)
|
||||
install: all prepare-install
|
||||
${INSTALL} ${PLUGIN} ${DESTDIR}
|
||||
else
|
||||
all:
|
||||
@echo "Not installing the random plugin"
|
||||
endif
|
||||
|
||||
# $Id$
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(random.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
RANDOM_BUILD=1
|
||||
|
||||
AC_CHECK_FUNCS(usleep,, [AC_MSG_WARN([No usleep() found, not building this plugin]) && RANDOM_BUILD=0])
|
||||
AC_SUBST(RANDOM_BUILD,$RANDOM_BUILD)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
@ -0,0 +1,22 @@
|
||||
PLUGIN=whois.so
|
||||
|
||||
include ../Makefile.plugins
|
||||
|
||||
ifeq (@WHOIS_BUILD@,1)
|
||||
all: ${PLUGIN}
|
||||
else
|
||||
all:
|
||||
@echo "Not building the whois plugin"
|
||||
endif
|
||||
|
||||
ifeq (@WHOIS_BUILD@,1)
|
||||
install: all prepare-install
|
||||
${INSTALL} ${PLUGIN} ${DESTDIR}
|
||||
else
|
||||
all:
|
||||
@echo "Not installing the whois plugin"
|
||||
endif
|
||||
|
||||
# $Id$
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `popt' library (-lpopt). */
|
||||
#undef HAVE_LIBPOPT
|
||||
|
||||
/* Define to 1 if you have the `poptGetContext' function. */
|
||||
#undef HAVE_POPTGETCONTEXT
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@
|
||||
dnl $Id$
|
||||
|
||||
AC_INIT(whois.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
WHOIS_BUILD=1
|
||||
AC_CHECK_FUNCS(poptGetContext,,
|
||||
[AC_CHECK_LIB(popt,poptGetContext,,[AC_MSG_WARN([No popt development environment found, not building this plugin]) && WHOIS_BUILD=0])])
|
||||
AC_SUBST(WHOIS_BUILD,$WHOIS_BUILD)
|
||||
AC_OUTPUT(Makefile)
|
||||
|
Loading…
Reference in New Issue