Skip to content

CFE-2780: Fixed warnings from autoreconf #5678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dnl # Run ./autogen.sh to build configure script
dnl #
dnl ##########################################################################

AC_PREREQ(2.63)
AC_PREREQ([2.63])

m4_define([cfversion_from_env], m4_normalize(m4_esyscmd([echo $EXPLICIT_VERSION])))
m4_define([cfversion_from_file], m4_normalize(m4_esyscmd([cat CFVERSION])))
Expand All @@ -46,7 +46,7 @@ m4_ifval(cfversion_from_env, [
])


AC_INIT(cfengine, cfversion)
AC_INIT([cfengine],[cfversion])
AC_CONFIG_SRCDIR([libpromises/generic_agent.c])
AC_CANONICAL_TARGET

Expand All @@ -69,7 +69,7 @@ m4_define(SERIAL_TESTS, m4_bmatch(AUTOMAKE_VERSION, [^1\.\([0-9]\|1[0-1]\)\(\.\|
AC_MSG_RESULT(AUTOMAKE_VERSION)


AM_INIT_AUTOMAKE([tar-ustar] SERIAL_TESTS)
AM_INIT_AUTOMAKE([tar-ustar] SERIAL_TESTS [subdir-objects])
AM_MAINTAINER_MODE([enable])

m4_divert_text([DEFAULTS], [: "${AR_FLAGS=cr}"])
Expand Down Expand Up @@ -137,13 +137,13 @@ AS_CASE([${target_os}],
dnl GCC specific flags
m4_include([m4/cf3_gcc_flags.m4])

# Use either new LT_INIT or old AC_DISABLE_STATIC/AC_PROG_LIBTOOL macros
# Use either new LT_INIT or old AC_DISABLE_STATIC/LT_INIT macros
m4_ifdef([LT_INIT],
[LT_INIT([disable-static])],
[AC_DISABLE_STATIC
AC_PROG_LIBTOOL])
LT_INIT])

AM_PROG_LEX
AC_PROG_LEX(noyywrap)
AC_PROG_YACC
AC_PROG_INSTALL
AC_PATH_PROG([PERL], [perl])
Expand Down Expand Up @@ -819,9 +819,6 @@ AC_CHECK_HEADERS(sys/jail.h, [], [], [AC_INCLUDES_DEFAULT
])
AC_CHECK_HEADERS(net/route.h netinet/in.h netinet/ip.h)


AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_HEADER_STDBOOL
Expand Down
6 changes: 3 additions & 3 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ MAINTAINERCLEANFILES = Makefile.in mdate-sh

# only re-run the outputs for examples that already have an example_output block
remake:
perl ./remake_outputs.pl $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl `shell grep -l example_output $(dist_examples_DATA)`

recheck:
perl ./remake_outputs.pl -c $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl -c `shell grep -l example_output $(dist_examples_DATA)`

recheck_verbose:
perl ./remake_outputs.pl -v -c $(shell grep -l example_output $(dist_examples_DATA))
perl ./remake_outputs.pl -v -c `shell grep -l example_output $(dist_examples_DATA)`
4 changes: 2 additions & 2 deletions tests/load/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ db_load_LDADD = ../unit/libdb.la


lastseen_load_SOURCES = lastseen_load.c \
$(srcdir)/../../libpromises/lastseen.c \
$(srcdir)/../../libntech/libutils/statistics.c
../../libpromises/lastseen.c \
../../libntech/libutils/statistics.c
lastseen_load_LDADD = ../unit/libdb.la ../../libpromises/libpromises.la
endif

Expand Down
172 changes: 44 additions & 128 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,6 @@ AM_CFLAGS = $(PTHREAD_CFLAGS)
check_LTLIBRARIES = libtest.la
libtest_la_SOURCES = cmockery.c cmockery.h schema.h test.c test.h

libtest_la_LIBADD = ../../libntech/libcompat/libcompat.la


check_LTLIBRARIES += libdb.la
libdb_la_SOURCES = db_stubs.c \
../../libpromises/dbm_api.c \
../../libpromises/dbm_quick.c \
../../libpromises/dbm_tokyocab.c \
../../libpromises/dbm_lmdb.c \
../../libpromises/dbm_migration.c \
../../libpromises/dbm_migration_lastseen.c \
../../libpromises/global_mutex.c \
../../cf-check/backup.c \
../../cf-check/diagnose.c \
../../cf-check/lmdump.c \
../../cf-check/repair.c \
../../cf-check/replicate_lmdb.c \
../../cf-check/utilities.c \
../../cf-check/validate.c \
../../libntech/libutils/logging.c \
../../libntech/libutils/mutex.c \
../../libntech/libutils/cleanup.c
if HPUX
libdb_la_SOURCES += ../../libpromises/cf3globals.c
endif
libdb_la_LIBADD = ../../libntech/libutils/libutils.la
#libdb_la_CPPFLAGS = $(LMDB_CPPFLAGS) $(TOKYOCABINET_CPPFLAGS) $(QDBM_CPPFLAGS)
# Make sure that source files are compiled to separate object files
# libdb_la-file.o
libdb_la_CFLAGS = $(AM_CFLAGS)

check_PROGRAMS = \
processes_select_test \
arg_split_test \
Expand Down Expand Up @@ -216,33 +185,15 @@ set_domainname_test_LDADD = libtest.la ../../libpromises/libpromises.la

regex_test_SOURCES = regex_test.c ../../libpromises/match_scope.c

protocol_test_SOURCES = protocol_test.c \
../../cf-serverd/server_common.c \
../../cf-serverd/server_tls.c \
../../cf-serverd/server.c \
../../cf-serverd/cf-serverd-enterprise-stubs.c \
../../cf-serverd/server_transform.c \
../../cf-serverd/cf-serverd-functions.c \
../../cf-serverd/server_access.c \
../../cf-serverd/strlist.c
protocol_test_LDADD = ../../libpromises/libpromises.la libtest.la
protocol_test_SOURCES = protocol_test.c
protocol_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-serverd/libcf-serverd.la

if HAVE_AVAHI_CLIENT
if HAVE_AVAHI_COMMON

findhub_test_SOURCES = findhub_test.c \
../../cf-agent/findhub.c \
../../cf-agent/load_avahi.c

avahi_config_test_SOURCES = avahi_config_test.c \
../../cf-serverd/server_common.c \
../../cf-serverd/server_tls.c \
../../cf-serverd/server.c \
../../cf-serverd/server_transform.c \
../../cf-serverd/cf-serverd-enterprise-stubs.c \
../../cf-serverd/server_access.c \
../../cf-serverd/server_classic.c \
../../cf-serverd/strlist.c
findhub_test_SOURCES = findhub_test.c

avahi_config_test_SOURCES = avahi_config_test.c
avahi_config_test_LDADD = ../../libpromises/libpromises.la libtest.la

endif
Expand All @@ -252,31 +203,18 @@ db_test_SOURCES = db_test.c
db_test_LDADD = libtest.la ../../libpromises/libpromises.la

db_concurrent_test_SOURCES = db_concurrent_test.c
#db_concurrent_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
db_concurrent_test_LDADD = libtest.la libdb.la
db_concurrent_test_LDADD = libtest.la ../../libpromises/libpromises.la

lastseen_test_SOURCES = lastseen_test.c \
../../libntech/libutils/statistics.c
#lastseen_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
lastseen_test_SOURCES = lastseen_test.c
lastseen_test_LDADD = libtest.la ../../libpromises/libpromises.la

lastseen_migration_test_SOURCES = lastseen_migration_test.c
#lastseen_migration_test_CPPFLAGS = $(libdb_la_CPPFLAGS)
lastseen_migration_test_LDADD = ../../libpromises/libpromises.la

CLEANFILES = *.gcno *.gcda cfengine-enterprise.so

package_versions_compare_test_SOURCES = package_versions_compare_test.c \
../../cf-agent/package_module.c \
../../cf-agent/verify_packages.c \
../../cf-agent/verify_new_packages.c \
../../cf-agent/vercmp.c \
../../cf-agent/vercmp_internal.c \
../../cf-agent/retcode.c \
../../libpromises/match_scope.c

#package_versions_compare_test_CPPFLAGS = $(AM_CPPFLAGS)
package_versions_compare_test_LDADD = ../../libpromises/libpromises.la \
package_versions_compare_test_SOURCES = package_versions_compare_test.c
package_versions_compare_test_LDADD = ../../cf-agent/libcf-agent.la ../../libpromises/libpromises.la \
libtest.la

files_copy_test_SOURCES = files_copy_test.c
Expand All @@ -285,15 +223,10 @@ files_copy_test_LDADD = libtest.la ../../libpromises/libpromises.la
sort_test_SOURCES = sort_test.c
sort_test_LDADD = libtest.la ../../libpromises/libpromises.la

logging_test_SOURCES = logging_test.c \
../../libpromises/syslog_client.c \
../../libpromises/patches.c \
../../libpromises/constants.c
logging_test_LDADD = libtest.la ../../libntech/libutils/libutils.la
logging_test_SOURCES = logging_test.c
logging_test_LDADD = libtest.la ../../libpromises/libpromises.la

connection_management_test_SOURCES = connection_management_test.c \
../../cf-serverd/server_common.c \
../../cf-serverd/server_tls.c
connection_management_test_SOURCES = connection_management_test.c
connection_management_test_LDADD = ../../libpromises/libpromises.la \
libtest.la \
../../cf-serverd/libcf-serverd.la
Expand All @@ -310,11 +243,8 @@ if LINUX

check_PROGRAMS += linux_process_test

linux_process_test_SOURCES = linux_process_test.c \
../../libpromises/process_unix.c \
../../libpromises/process_linux.c \
../../libntech/libutils/file_lib.c
linux_process_test_LDADD = libtest.la ../../libntech/libutils/libutils.la
linux_process_test_SOURCES = linux_process_test.c
linux_process_test_LDADD = libtest.la ../../libpromises/libpromises.la

endif

Expand All @@ -325,88 +255,74 @@ check_PROGRAMS += aix_process_test
# because they provide dummy versions of some standard functions.
set_domainname_test_LDFLAGS = -Wl,-bexpall
evalfunction_test_LDFLAGS = -Wl,-bexpall
aix_process_test_SOURCES = aix_process_test.c \
../../libpromises/process_unix.c \
../../libpromises/process_aix.c \
../../libntech/libutils/file_lib.c
aix_process_test_LDADD = libtest.la ../../libntech/libutils/libutils.la
aix_process_test_SOURCES = aix_process_test.c
aix_process_test_LDADD = libtest.la ../../libpromises/libpromises.la

endif

if SOLARIS

check_PROGRAMS += solaris_process_test

solaris_process_test_SOURCES = solaris_process_test.c \
../../libpromises/process_unix.c \
../../libpromises/process_solaris.c \
../../libntech/libutils/file_lib.c
solaris_process_test_LDADD = libtest.la ../../libntech/libutils/libutils.la
solaris_process_test_SOURCES = solaris_process_test.c
solaris_process_test_LDADD = libtest.la ../../libpromises/libpromises.la

endif

process_terminate_unix_test_SOURCES = process_terminate_unix_test.c \
../../libpromises/process_unix.c
process_terminate_unix_test_LDADD = libtest.la ../../libntech/libutils/libutils.la
process_terminate_unix_test_SOURCES = process_terminate_unix_test.c
process_terminate_unix_test_LDADD = libtest.la ../../libpromises/libpromises.la

exec_config_test_SOURCES = exec-config-test.c \
../../cf-execd/exec-config.c ../../cf-execd/execd-config.c
exec_config_test_LDADD = libtest.la ../../libpromises/libpromises.la
exec_config_test_SOURCES = exec-config-test.c
exec_config_test_LDADD = libtest.la ../../libpromises/libpromises.la ../../cf-execd/libcf-execd.la

sysinfo_test_LDADD = libtest.la \
../../libenv/libenv.la \
../../libpromises/libpromises.la

mon_cpu_test_SOURCES = mon_cpu_test.c \
../../cf-monitord/mon.h \
../../cf-monitord/mon_cpu.c
mon_cpu_test_LDADD = ../../libpromises/libpromises.la libtest.la
mon_cpu_test_SOURCES = mon_cpu_test.c
mon_cpu_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-monitord/libcf-monitord.la

mon_load_test_SOURCES = mon_load_test.c \
../../cf-monitord/mon.h \
../../cf-monitord/mon_load.c
mon_load_test_LDADD = ../../libpromises/libpromises.la libtest.la
mon_load_test_SOURCES = mon_load_test.c
mon_load_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-monitord/libcf-monitord.la

mon_processes_test_SOURCES = mon_processes_test.c \
../../cf-monitord/mon.h \
../../cf-monitord/mon_processes.c
mon_processes_test_LDADD = ../../libpromises/libpromises.la libtest.la
mon_processes_test_SOURCES = mon_processes_test.c
mon_processes_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-monitord/libcf-monitord.la

key_test_SOURCES = key_test.c
key_test_LDADD = ../../libpromises/libpromises.la \
../../libntech/libutils/libutils.la \
libtest.la

strlist_test_SOURCES = strlist_test.c \
../../cf-serverd/strlist.c \
../../cf-serverd/strlist.h
strlist_test_SOURCES = strlist_test.c
strlist_test_LDADD = ../../libpromises/libpromises.la libtest.la ../../cf-serverd/libcf-serverd.la

verify_databases_test_LDADD = ../../cf-agent/libcf-agent.la libtest.la

iteration_test_SOURCES = iteration_test.c

cf_upgrade_test_SOURCES = cf_upgrade_test.c \
$(top_srcdir)/cf-upgrade/alloc-mini.c \
$(top_srcdir)/cf-upgrade/alloc-mini.h \
$(top_srcdir)/cf-upgrade/command_line.c \
$(top_srcdir)/cf-upgrade/command_line.h \
$(top_srcdir)/cf-upgrade/configuration.c \
$(top_srcdir)/cf-upgrade/configuration.h \
$(top_srcdir)/cf-upgrade/log.c $(top_srcdir)/cf-upgrade/log.h \
$(top_srcdir)/cf-upgrade/process.c $(top_srcdir)/cf-upgrade/process.h \
$(top_srcdir)/cf-upgrade/update.c \
$(top_srcdir)/cf-upgrade/update.h
cf_upgrade_test_CPPFLAGS = -I$(top_srcdir)/cf-upgrade -I$(top_srcdir)/libntech/libutils -I$(top_srcdir)
cf_upgrade_test_LDADD = libtest.la ../../libntech/libcompat/libcompat.la
- ../../cf-upgrade/alloc-mini.c \
- ../../cf-upgrade/alloc-mini.h \
- ../../cf-upgrade/command_line.c \
- ../../cf-upgrade/command_line.h \
- ../../cf-upgrade/configuration.c \
- ../../cf-upgrade/configuration.h \
- ../../cf-upgrade/log.c ../../cf-upgrade/log.h \
- ../../cf-upgrade/process.c ../../cf-upgrade/process.h \
- ../../cf-upgrade/update.c \
- ../../cf-upgrade/update.h
cf_upgrade_test_CPPFLAGS = -I../../cf-upgrade -I../../libntech/libutils -I../../
cf_upgrade_test_LDADD = libtest.la ../../libpromises/libpromises.la

if !NT
check_PROGRAMS += nfs_test
nfs_test_SOURCES = nfs_test.c
nfs_test_LDADD = ../../libpromises/libpromises.la libtest.la

init_script_test_helper_LDADD =
init_script_test_helper_SOURCES = init_script_test_helper.c
init_script_test.sh: init_script_test_helper
CLEANFILES += init_script_test_helper
noinst_PROGRAMS += init_script_test_helper
endif
EXTRA_DIST += init_script_test_helper.c
EXTRA_DIST += init_script_test.sh
8 changes: 4 additions & 4 deletions tests/unit/init_script_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ fi
# Fail on any error.
set -e

cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-execd
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-serverd
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-monitord
cp init_script_test_helper $CFTEST_PREFIX/bin/cf-test-agent
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-execd
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-serverd
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-monitord
cp .libs/init_script_test_helper $CFTEST_PREFIX/bin/cf-test-agent

touch $CFTEST_PREFIX/inputs/promises.cf

Expand Down
3 changes: 0 additions & 3 deletions tests/unit/logging_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#include <syslog_client.h>
#include <string_lib.h>

// This test uses syslog_client.c directly, without libpromises,
// this is necessary so we don't get "undefined symbol" errors:
char VFQNAME[CF_MAXVARSIZE];

static struct sockaddr *got_address;

Expand Down
Loading
Loading