diff options
| author | David M. Syzdek <david.syzdek@acsalaska.com> | 2020-02-03 15:21:00 -0900 |
|---|---|---|
| committer | David M. Syzdek <david.syzdek@acsalaska.com> | 2020-02-03 15:21:00 -0900 |
| commit | 45826549c26621056df4edec1d26fccc4dd55c40 (patch) | |
| tree | 012ce86b996a0e47bc122a4e1715759d60e899d0 | |
| parent | e24df4396b93075ab74e267354d3df9ed9c46820 (diff) | |
| download | akcom-udpecho-45826549c26621056df4edec1d26fccc4dd55c40.tar.gz akcom-udpecho-45826549c26621056df4edec1d26fccc4dd55c40.tar.bz2 akcom-udpecho-45826549c26621056df4edec1d26fccc4dd55c40.tar.xz akcom-udpecho-45826549c26621056df4edec1d26fccc4dd55c40.zip | |
build: adding autotools build files
| -rw-r--r-- | .gitignore | 26 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | AUTHORS | 3 | ||||
| -rw-r--r-- | ChangeLog.md | 11 | ||||
| -rw-r--r-- | Makefile.am | 162 | ||||
| -rw-r--r-- | NEWS.md | 0 | ||||
| -rw-r--r-- | TODO.md | 5 | ||||
| -rw-r--r-- | acinclude.m4 | 36 | ||||
| -rwxr-xr-x | autogen.sh | 112 | ||||
| -rw-r--r-- | build-aux/.gitignore | 13 | ||||
| -rw-r--r-- | build-aux/git-tar-name.txt | 1 | ||||
| -rw-r--r-- | configure.ac | 215 | ||||
| m--------- | contrib/bindletools | 0 | ||||
| -rw-r--r-- | include/.gitignore | 3 | ||||
| -rw-r--r-- | m4/.gitignore | 6 | ||||
| -rw-r--r-- | src/akcom-udpecho.c | 6 | ||||
| -rw-r--r-- | src/akcom-udpechod.c | 4 |
17 files changed, 605 insertions, 1 deletions
| @@ -1,10 +1,36 @@ | |||
| 1 | *~ | 1 | *~ |
| 2 | *.lo | 2 | *.lo |
| 3 | *.mode1v3 | ||
| 3 | *.o | 4 | *.o |
| 5 | *.pbxuser | ||
| 6 | *.xcworkspace | ||
| 4 | *.swp | 7 | *.swp |
| 8 | *.xcodeproj/ | ||
| 5 | .DS_Store | 9 | .DS_Store |
| 6 | .deps | 10 | .deps |
| 7 | .dirstamp | 11 | .dirstamp |
| 12 | /ABOUT-NLS | ||
| 13 | /GPATH | ||
| 14 | /GRTAGS | ||
| 15 | /GTAGS | ||
| 16 | /INSTALL | ||
| 17 | /Makefile | ||
| 18 | /Makefile.in | ||
| 19 | /build-aux/git-package-version | ||
| 20 | /libtool | ||
| 21 | /akcom-udpecho-*.tar.* | ||
| 22 | /akcom-udpecho-*.zip | ||
| 8 | a.out | 23 | a.out |
| 24 | aclocal.m4 | ||
| 25 | autom4te.cache | ||
| 26 | autoscan.log | ||
| 27 | config.h | ||
| 28 | config.h.in | ||
| 29 | config.log | ||
| 30 | config.status | ||
| 31 | configure | ||
| 32 | configure.scan | ||
| 33 | stamp-h1 | ||
| 34 | xcuserdata | ||
| 9 | /src/akcom-udpecho | 35 | /src/akcom-udpecho |
| 10 | /src/akcom-udpechod | 36 | /src/akcom-udpechod |
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..dfc1e22 --- /dev/null +++ b/.gitmodules | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | [submodule "contrib/bindletools"] | ||
| 2 | path = contrib/bindletools | ||
| 3 | url = https://github.com/bindle/bindletools.git | ||
| @@ -0,0 +1,3 @@ | |||
| 1 | David M. Syzdek -- first version of all files except those provided by or | ||
| 2 | generated by GNU Gettext, gnulib, GNU Libtool, GNU Autoconf, and | ||
| 3 | GNU AutoMake. | ||
diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 0000000..cf75de8 --- /dev/null +++ b/ChangeLog.md | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | |||
| 2 | Alaska Communications UDP Echo Tools | ||
| 3 | ==================================== | ||
| 4 | |||
| 5 | Copyright (C) 2020 Alaska Communications | ||
| 6 | All rights reserved. | ||
| 7 | |||
| 8 | 0.1.0 | ||
| 9 | ----- | ||
| 10 | - initial release of package (syzdek) | ||
| 11 | |||
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..16a1f1b --- /dev/null +++ b/Makefile.am | |||
| @@ -0,0 +1,162 @@ | |||
| 1 | # | ||
| 2 | # Alaska Communications UDP Echo Tools | ||
| 3 | # Copyright (C) 2020 Alaska Communications | ||
| 4 | # | ||
| 5 | # Redistribution and use in source and binary forms, with or without | ||
| 6 | # modification, are permitted provided that the following conditions are | ||
| 7 | # met: | ||
| 8 | # | ||
| 9 | # 1. Redistributions of source code must retain the above copyright | ||
| 10 | # notice, this list of conditions and the following disclaimer. | ||
| 11 | # | ||
| 12 | # 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | # notice, this list of conditions and the following disclaimer in the | ||
| 14 | # documentation and/or other materials provided with the distribution. | ||
| 15 | # | ||
| 16 | # 3. Neither the name of the copyright holder nor the names of its | ||
| 17 | # contributors may be used to endorse or promote products derived from | ||
| 18 | # this software without specific prior written permission. | ||
| 19 | # | ||
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
| 24 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 25 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| 26 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 27 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 28 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 29 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 31 | # | ||
| 32 | # @configure_input@ | ||
| 33 | # | ||
| 34 | # Makefile.am - automate compiling on a unix platform | ||
| 35 | # | ||
| 36 | |||
| 37 | # Sub directories | ||
| 38 | SUBDIRS = $(subdirs) | ||
| 39 | DIST_SUBDIRS = $(subdirs) | ||
| 40 | |||
| 41 | |||
| 42 | # GNU make options | ||
| 43 | V = 0 | ||
| 44 | |||
| 45 | |||
| 46 | # Global flags | ||
| 47 | AM_LIBS = | ||
| 48 | AM_LDFLAGS = | ||
| 49 | AM_CFLAGS = -O2 $(CFLAGS_WARNINGS) | ||
| 50 | AM_CXXFLAGS = -O2 @AM_CXXFLAGS@ | ||
| 51 | AM_OBJCFLAGS = -O2 @AM_OBJCFLAGS@ | ||
| 52 | AM_CPPFLAGS = -O2 \ | ||
| 53 | -UPMARK \ | ||
| 54 | -DHAVE_CONFIG_H=1 \ | ||
| 55 | -I$(top_builddir)/include \ | ||
| 56 | -I$(top_srcdir)/include \ | ||
| 57 | -DSYSCONFDIR=\"$(sysconfdir)\" | ||
| 58 | ACLOCAL_AMFLAGS = -I m4 -W all -W error | ||
| 59 | AM_MAKEINFOFLAGS = --no-split | ||
| 60 | AM_DISTCHECK_CONFIGURE_FLAGS = --enable-strictwarnings \ | ||
| 61 | CFLAGS="$(CFLAGS)" \ | ||
| 62 | CPPFLAGS="$(CPPFLAGS)" \ | ||
| 63 | LDFLAGS="$(LDFLAGS)" | ||
| 64 | AM_YFLAGS = -d | ||
| 65 | DEFS = | ||
| 66 | LDADD = | ||
| 67 | |||
| 68 | |||
| 69 | # automake targets | ||
| 70 | bin_PROGRAMS = src/akcom-udpecho \ | ||
| 71 | src/akcom-udpechod | ||
| 72 | check_PROGRAMS = | ||
| 73 | doc_DATA = | ||
| 74 | noinst_DATA = | ||
| 75 | EXTRA_PROGRAMS = | ||
| 76 | include_HEADERS = | ||
| 77 | info_TEXINFOS = | ||
| 78 | lib_LIBRARIES = | ||
| 79 | lib_LTLIBRARIES = | ||
| 80 | EXTRA_LIBRARIES = | ||
| 81 | EXTRA_LTLIBRARIES = | ||
| 82 | man_MANS = | ||
| 83 | noinst_HEADERS = src/akcom-udpecho.h | ||
| 84 | noinst_PROGRAMS = | ||
| 85 | noinst_LIBRARIES = | ||
| 86 | |||
| 87 | |||
| 88 | # lists | ||
| 89 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = | ||
| 90 | BUILT_SOURCES = | ||
| 91 | TESTS = | ||
| 92 | XFAIL_TESTS = | ||
| 93 | EXTRA_MANS = | ||
| 94 | EXTRA_DIST = $(noinst_HEADERS) \ | ||
| 95 | ChangeLog.md \ | ||
| 96 | NEWS.md \ | ||
| 97 | README.md \ | ||
| 98 | TODO.md | ||
| 99 | CLEANFILES = \ | ||
| 100 | $(builddir)/a.out $(srcdir)/a.out \ | ||
| 101 | $(builddir)/*/a.out $(srcdir)/*/a.out \ | ||
| 102 | config.h.in~ $(srcdir)/config.h.in~ \ | ||
| 103 | $(man_MANS) \ | ||
| 104 | $(pkgdata_DATA) \ | ||
| 105 | $(bin_SCRIPTS) \ | ||
| 106 | $(sbin_SCRIPTS) \ | ||
| 107 | @PACKAGE_TARNAME@-*.tar.* \ | ||
| 108 | @PACKAGE_TARNAME@-*.txz \ | ||
| 109 | @PACKAGE_TARNAME@-*.zip | ||
| 110 | DISTCHECK_CONFIGURE_FLAGS = --enable-strictwarnings | ||
| 111 | |||
| 112 | |||
| 113 | # macros for src/akcom-udpecho | ||
| 114 | src_akcom_udpecho_DEPENDENCIES = Makefile | ||
| 115 | src_akcom_udpecho_CPPFLAGS = -DPROGRAM_NAME="\"akcom-udpecho\"" $(AM_CPPFLAGS) | ||
| 116 | src_akcom_udpecho_CFLAGS = $(AM_CFLAGS) | ||
| 117 | src_akcom_udpecho_LDFLAGS = $(AM_LDFLAGS) | ||
| 118 | src_akcom_udpecho_LDADD = $(AM_LDADD) | ||
| 119 | src_akcom_udpecho_SOURCES = src/akcom-udpecho.c src/akcom-udpecho.h | ||
| 120 | |||
| 121 | |||
| 122 | # macros for src/akcom-udpechod | ||
| 123 | src_akcom_udpechod_DEPENDENCIES = Makefile | ||
| 124 | src_akcom_udpechod_CPPFLAGS = -DPROGRAM_NAME="\"akcom-udpechod\"" $(AM_CPPFLAGS) | ||
| 125 | src_akcom_udpechod_CFLAGS = $(AM_CFLAGS) | ||
| 126 | src_akcom_udpechod_LDFLAGS = $(AM_LDFLAGS) | ||
| 127 | src_akcom_udpechod_LDADD = $(AM_LDADD) | ||
| 128 | src_akcom_udpechod_SOURCES = src/akcom-udpechod.c src/akcom-udpecho.h | ||
| 129 | |||
| 130 | |||
| 131 | # Makefile includes | ||
| 132 | GIT_PACKAGE_VERSION_DIR=include | ||
| 133 | SUBST_EXPRESSIONS = | ||
| 134 | include $(srcdir)/contrib/bindletools/build-aux/makefile-bindle.am | ||
| 135 | include $(srcdir)/contrib/bindletools/build-aux/makefile-autotools.am | ||
| 136 | include $(srcdir)/contrib/bindletools/build-aux/makefile-subst.am | ||
| 137 | include $(srcdir)/contrib/bindletools/build-aux/makefile-version.am | ||
| 138 | |||
| 139 | |||
| 140 | # custom targets | ||
| 141 | .PHONY: | ||
| 142 | |||
| 143 | |||
| 144 | # local targets | ||
| 145 | install-exec-local: | ||
| 146 | |||
| 147 | install-data-local: | ||
| 148 | |||
| 149 | install-exec-hook: | ||
| 150 | |||
| 151 | install-data-hook: | ||
| 152 | |||
| 153 | uninstall-local: | ||
| 154 | |||
| 155 | clean-local: | ||
| 156 | |||
| 157 | distclean-local: | ||
| 158 | rm -fR $(srcdir)/autom4te.cache | ||
| 159 | |||
| 160 | maintainer-clean-local: | ||
| 161 | |||
| 162 | # end of automake file | ||
| @@ -0,0 +1,5 @@ | |||
| 1 | |||
| 2 | Alaska Communications UDP Echo Tools | ||
| 3 | Copyright (C) 2020 Alaska Communications | ||
| 4 | All rights reserved. | ||
| 5 | |||
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..9d683d7 --- /dev/null +++ b/acinclude.m4 | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | # | ||
| 2 | # Alaska Communications UDP Echo Tools | ||
| 3 | # Copyright (C) 2020 Alaska Communications | ||
| 4 | # | ||
| 5 | # Redistribution and use in source and binary forms, with or without | ||
| 6 | # modification, are permitted provided that the following conditions are | ||
| 7 | # met: | ||
| 8 | # | ||
| 9 | # 1. Redistributions of source code must retain the above copyright | ||
| 10 | # notice, this list of conditions and the following disclaimer. | ||
| 11 | # | ||
| 12 | # 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | # notice, this list of conditions and the following disclaimer in the | ||
| 14 | # documentation and/or other materials provided with the distribution. | ||
| 15 | # | ||
| 16 | # 3. Neither the name of the copyright holder nor the names of its | ||
| 17 | # contributors may be used to endorse or promote products derived from | ||
| 18 | # this software without specific prior written permission. | ||
| 19 | # | ||
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
| 24 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 25 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| 26 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 27 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 28 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 29 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 31 | # | ||
| 32 | # acinclude.m4 - custom m4 macros used by configure.ac | ||
| 33 | # | ||
| 34 | |||
| 35 | |||
| 36 | # end of M4 file | ||
diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..9147dce --- /dev/null +++ b/autogen.sh | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # LDAP Utilities | ||
| 4 | # Copyright (C) 2015 Bindle Binaries <syzdek@bindlebinaries.com>. | ||
| 5 | # All rights reserved. | ||
| 6 | # | ||
| 7 | # @BINDLE_BINARIES_BSD_LICENSE_START@ | ||
| 8 | # | ||
| 9 | # Redistribution and use in source and binary forms, with or without | ||
| 10 | # modification, are permitted provided that the following conditions are | ||
| 11 | # met: | ||
| 12 | # | ||
| 13 | # 1. Redistributions of source code must retain the above copyright | ||
| 14 | # notice, this list of conditions and the following disclaimer. | ||
| 15 | # | ||
| 16 | # 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | # notice, this list of conditions and the following disclaimer in the | ||
| 18 | # documentation and/or other materials provided with the distribution. | ||
| 19 | # | ||
| 20 | # 3. Neither the name of the copyright holder nor the names of its | ||
| 21 | # contributors may be used to endorse or promote products derived from | ||
| 22 | # this software without specific prior written permission. | ||
| 23 | # | ||
| 24 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 25 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 26 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 27 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
| 28 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 29 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| 30 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 31 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 32 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 33 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 34 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 35 | # | ||
| 36 | # @BINDLE_BINARIES_BSD_LICENSE_END@ | ||
| 37 | # | ||
| 38 | # autogen.sh - runs GNU Autotools to create build environment | ||
| 39 | # | ||
| 40 | |||
| 41 | AUTOGENNAME="`basename ${0}`" || exit 1 | ||
| 42 | SRCDIR="`dirname ${0}`" | ||
| 43 | |||
| 44 | |||
| 45 | # check for required programs | ||
| 46 | for TEST_PROG in which autoreconf autoscan find git;do | ||
| 47 | which ${TEST_PROG} 2> /dev/null > /dev/null; | ||
| 48 | if test $? -ne 0;then | ||
| 49 | echo "${AUTOGENNAME}: unable to find \"${TEST_PROG}\"" | ||
| 50 | exit 1 | ||
| 51 | fi | ||
| 52 | done | ||
| 53 | |||
| 54 | |||
| 55 | # updates git repository | ||
| 56 | if test -d ${SRCDIR}/.git || test -f ${SRCDIR}/.git;then | ||
| 57 | cd ${SRCDIR} | ||
| 58 | git submodule init || exit 1 | ||
| 59 | git submodule sync || exit 1 | ||
| 60 | git submodule update --init --recursive --merge || exit 1 | ||
| 61 | cd - | ||
| 62 | fi | ||
| 63 | |||
| 64 | |||
| 65 | # generates files for bindletools | ||
| 66 | if test -x ${SRCDIR}/contrib/bindletools/autogen.sh;then | ||
| 67 | ${SRCDIR}/contrib/bindletools/autogen.sh || exit 1 | ||
| 68 | fi | ||
| 69 | |||
| 70 | |||
| 71 | # symlinks Bindle Tools M4 macros | ||
| 72 | if test -f ${SRCDIR}/contrib/bindletools/m4/bindle-gcc.m4;then | ||
| 73 | cd ${SRCDIR}/m4 | ||
| 74 | rm -f ./bindle*.m4 || exit 1 | ||
| 75 | ln -s ../contrib/bindletools/m4/bindle*.m4 ./ | ||
| 76 | cd - | ||
| 77 | fi | ||
| 78 | |||
| 79 | |||
| 80 | # perform pre-hook | ||
| 81 | if test -f ${SRCDIR}/build-aux/autogen-pre-hook.sh;then | ||
| 82 | . ${SRCDIR}/build-aux/autogen-pre-hook.sh | ||
| 83 | fi | ||
| 84 | |||
| 85 | |||
| 86 | # Performs some useful checks | ||
| 87 | autoscan ${SRCDIR} || exit 1 | ||
| 88 | |||
| 89 | |||
| 90 | # generates/installs autotools files | ||
| 91 | autoreconf -v -i -f -Wall \ | ||
| 92 | -I m4 \ | ||
| 93 | -m \ | ||
| 94 | ${SRCDIR} \ | ||
| 95 | || exit 1 | ||
| 96 | |||
| 97 | |||
| 98 | # perform post-hook | ||
| 99 | if test -f ${SRCDIR}/build-aux/autogen-post-hook.sh;then | ||
| 100 | . ${SRCDIR}/build-aux/autogen-post-hook.sh | ||
| 101 | fi | ||
| 102 | |||
| 103 | |||
| 104 | # makes build directory | ||
| 105 | mkdir -p ${SRCDIR}/build | ||
| 106 | |||
| 107 | |||
| 108 | # add newline to create visual separation | ||
| 109 | echo " " | ||
| 110 | |||
| 111 | |||
| 112 | # end of script | ||
diff --git a/build-aux/.gitignore b/build-aux/.gitignore new file mode 100644 index 0000000..91f1835 --- /dev/null +++ b/build-aux/.gitignore | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | /compile | ||
| 2 | /config.guess | ||
| 3 | /config.sub | ||
| 4 | /depcomp | ||
| 5 | /git-package-version-prefix.h | ||
| 6 | /git-package-version.h | ||
| 7 | /git-package-version.txt | ||
| 8 | /install-sh | ||
| 9 | /ltmain.sh | ||
| 10 | /missing | ||
| 11 | /test-driver | ||
| 12 | /texinfo.tex | ||
| 13 | /ylwrap | ||
diff --git a/build-aux/git-tar-name.txt b/build-aux/git-tar-name.txt new file mode 100644 index 0000000..158329a --- /dev/null +++ b/build-aux/git-tar-name.txt | |||
| @@ -0,0 +1 @@ | |||
| akcom-udpecho | |||
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7d27d4b --- /dev/null +++ b/configure.ac | |||
| @@ -0,0 +1,215 @@ | |||
| 1 | # | ||
| 2 | # Alaska Communications UDP Echo Tools | ||
| 3 | # Copyright (C) 2020 Alaska Communications | ||
| 4 | # | ||
| 5 | # Redistribution and use in source and binary forms, with or without | ||
| 6 | # modification, are permitted provided that the following conditions are | ||
| 7 | # met: | ||
| 8 | # | ||
| 9 | # 1. Redistributions of source code must retain the above copyright | ||
| 10 | # notice, this list of conditions and the following disclaimer. | ||
| 11 | # | ||
| 12 | # 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | # notice, this list of conditions and the following disclaimer in the | ||
| 14 | # documentation and/or other materials provided with the distribution. | ||
| 15 | # | ||
| 16 | # 3. Neither the name of the copyright holder nor the names of its | ||
| 17 | # contributors may be used to endorse or promote products derived from | ||
| 18 | # this software without specific prior written permission. | ||
| 19 | # | ||
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR | ||
| 24 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 25 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| 26 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 27 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 28 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 29 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 31 | # | ||
| 32 | # configure.ac - automate compiling on a unix platform | ||
| 33 | # | ||
| 34 | |||
| 35 | # +-=-=-=-=-=-=-=-=-+ | ||
| 36 | # | | | ||
| 37 | # | Autoconf Init | | ||
| 38 | # | | | ||
| 39 | # +-=-=-=-=-=-=-=-=-+ | ||
| 40 | |||
| 41 | AC_PREREQ(2.65) | ||
| 42 | |||
| 43 | AC_COPYRIGHT([Copyright (C) 2020 Alaska Communications]) | ||
| 44 | AC_REVISION(0.1) | ||
| 45 | AC_INIT([Alaska Communications UDP Echo Tools],[0.0],[david.syzdek@acsalaska.com],[akcom-udpecho]) | ||
| 46 | |||
| 47 | AC_SUBST([RELEASE_MONTH],["February 2020"]) | ||
| 48 | |||
| 49 | PACKAGE_COPYRIGHT="Copyright (C) 2020 Alaska Communications" | ||
| 50 | AC_DEFINE_UNQUOTED(PACKAGE_COPYRIGHT, ["${PACKAGE_COPYRIGHT}"], [Copyright notice.]) | ||
| 51 | AC_SUBST([PACKAGE_COPYRIGHT], [${PACKAGE_COPYRIGHT}]) | ||
| 52 | |||
| 53 | |||
| 54 | # directory locations | ||
| 55 | AC_CONFIG_AUX_DIR([build-aux]) | ||
| 56 | AC_CONFIG_SRCDIR([build-aux/git-tar-name.txt]) | ||
| 57 | #AC_CONFIG_LIBOBJ_DIR(compat) | ||
| 58 | AC_CONFIG_HEADERS([config.h]) | ||
| 59 | AC_CONFIG_MACRO_DIR([m4]) | ||
| 60 | |||
| 61 | # determines host type | ||
| 62 | AC_CANONICAL_BUILD | ||
| 63 | AC_CANONICAL_HOST | ||
| 64 | AC_CANONICAL_TARGET | ||
| 65 | |||
| 66 | # configures for automake | ||
| 67 | AM_INIT_AUTOMAKE(gnu std-options subdir-objects foreign) | ||
| 68 | |||
| 69 | # Compilers | ||
| 70 | AC_PROG_CC | ||
| 71 | #AC_PROG_OBJC | ||
| 72 | AC_PROG_CXX | ||
| 73 | AM_PROG_CC_C_O | ||
| 74 | AC_PROG_LEX | ||
| 75 | AC_PROG_YACC | ||
| 76 | AC_PROG_INSTALL | ||
| 77 | AC_PROG_MAKE_SET | ||
| 78 | AC_USE_SYSTEM_EXTENSIONS # replaces AC_AIX AC_GNU_SOURCE AC_MINIX | ||
| 79 | AC_C_BIGENDIAN | ||
| 80 | AC_C_INLINE | ||
| 81 | |||
| 82 | # Version Info: | ||
| 83 | # Current -- the current version number of this API | ||
| 84 | # Revision -- the revision of the implementation of the API version | ||
| 85 | # Age -- How many seqential past API versions is supported by | ||
| 86 | # this implementation | ||
| 87 | # Format => Current:Revision:Age | ||
| 88 | # Convenience macro: | ||
| 89 | # AC_BINDLE_LIBTOOL_VERSION_INFO(current, revision, age) | ||
| 90 | AC_BINDLE_LIBTOOL_VERSION_INFO(0, 0, 0) | ||
| 91 | |||
| 92 | # binary locations | ||
| 93 | AC_PATH_PROG([SHELL], sh bash, [AC_MSG_ERROR([missing "sh"])], [$PATH]) | ||
| 94 | AC_CHECK_TOOLS(AR, ar gar, [AC_MSG_ERROR([missing binutil "ar"])]) | ||
| 95 | AC_CHECK_TOOLS(LD, ld gld, [AC_MSG_ERROR([missing binutil "ld"])]) | ||
| 96 | AC_CHECK_TOOLS(NM, nm gnm, [AC_MSG_ERROR([missing binutil "nm"])]) | ||
| 97 | AC_CHECK_TOOLS(RANLIB, ranlib granlib, [AC_MSG_ERROR([missing binutil "ranlib"])]) | ||
| 98 | AC_CHECK_TOOLS(STRIP, strip gstrip, [AC_MSG_ERROR([missing binutil "strip"])]) | ||
| 99 | |||
| 100 | # shell programs | ||
| 101 | AC_PROG_AWK | ||
| 102 | AC_PROG_EGREP | ||
| 103 | AC_PROG_FGREP | ||
| 104 | AM_PROG_LEX | ||
| 105 | AC_PROG_LN_S | ||
| 106 | AC_PROG_MKDIR_P | ||
| 107 | AC_PROG_SED | ||
| 108 | |||
| 109 | # GNU Libtool Support | ||
| 110 | LT_INIT(dlopen disable-fast-install win32-dll) | ||
| 111 | |||
| 112 | # check for common functions | ||
| 113 | AC_FUNC_ALLOCA | ||
| 114 | AC_FUNC_FORK | ||
| 115 | AC_FUNC_MALLOC | ||
| 116 | AC_FUNC_REALLOC | ||
| 117 | AC_FUNC_STRERROR_R | ||
| 118 | |||
| 119 | # Type checks | ||
| 120 | AC_TYPE_INT8_T | ||
| 121 | AC_TYPE_INT16_T | ||
| 122 | AC_TYPE_INT32_T | ||
| 123 | AC_TYPE_INT64_T | ||
| 124 | AC_TYPE_SIZE_T | ||
| 125 | AC_TYPE_SSIZE_T | ||
| 126 | AC_TYPE_UID_T | ||
| 127 | AC_TYPE_UINT8_T | ||
| 128 | AC_TYPE_UINT16_T | ||
| 129 | AC_TYPE_UINT32_T | ||
| 130 | AC_TYPE_UINT64_T | ||
| 131 | #AC_CHECK_TYPES([LDAPURLDesc],, [AC_MSG_ERROR([missing required datatype])],[#include <ldap.h>]) | ||
| 132 | |||
| 133 | # check for required functions | ||
| 134 | AC_CHECK_FUNCS([bzero], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 135 | AC_CHECK_FUNCS([clock_gettime], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 136 | AC_CHECK_FUNCS([getpass], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 137 | AC_CHECK_FUNCS([gettimeofday], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 138 | AC_CHECK_FUNCS([memset], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 139 | AC_CHECK_FUNCS([regcomp], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 140 | AC_CHECK_FUNCS([setlocale], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 141 | AC_CHECK_FUNCS([socket], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 142 | AC_CHECK_FUNCS([strcasecmp], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 143 | AC_CHECK_FUNCS([strchr], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 144 | AC_CHECK_FUNCS([strdup], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 145 | AC_CHECK_FUNCS([strerror], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 146 | AC_CHECK_FUNCS([strncasecmp], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 147 | AC_CHECK_FUNCS([strtol], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 148 | AC_CHECK_FUNCS([strtoul], [], [AC_MSG_ERROR([missing required functions])]) | ||
| 149 | |||
| 150 | # check for required libraries | ||
| 151 | AC_SEARCH_LIBS([getopt_long], c gnugetopt,,AC_MSG_ERROR([missing required function])) | ||
| 152 | AC_SEARCH_LIBS([ldap_dn2str], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 153 | AC_SEARCH_LIBS([ldap_dnfree], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 154 | AC_SEARCH_LIBS([ldap_explode_dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 155 | AC_SEARCH_LIBS([ldap_first_entry], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 156 | AC_SEARCH_LIBS([ldap_free_urldesc], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 157 | AC_SEARCH_LIBS([ldap_get_dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 158 | AC_SEARCH_LIBS([ldap_initialize], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 159 | AC_SEARCH_LIBS([ldap_result], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 160 | AC_SEARCH_LIBS([ldap_sasl_bind_s], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 161 | AC_SEARCH_LIBS([ldap_search_ext], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 162 | AC_SEARCH_LIBS([ldap_set_option], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 163 | AC_SEARCH_LIBS([ldap_str2dn], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 164 | AC_SEARCH_LIBS([ldap_unbind_ext_s], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 165 | AC_SEARCH_LIBS([ldap_url_parse], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 166 | AC_SEARCH_LIBS([ldap_value_free], ldap,,AC_MSG_ERROR([missing required function]), [-llber]) | ||
| 167 | AC_SEARCH_LIBS([socket], socket,,AC_MSG_ERROR([missing required function]), [-lresolv]) | ||
| 168 | |||
| 169 | # check for headers | ||
| 170 | AC_CHECK_HEADER_STDBOOL | ||
| 171 | AC_CHECK_HEADERS([arpa/inet.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 172 | AC_CHECK_HEADERS([fcntl.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 173 | AC_CHECK_HEADERS([netdb.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 174 | AC_CHECK_HEADERS([netinet/in.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 175 | AC_CHECK_HEADERS([termios.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 176 | AC_CHECK_HEADERS([ldap.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 177 | AC_CHECK_HEADERS([getopt.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 178 | AC_CHECK_HEADERS([signal.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 179 | AC_CHECK_HEADERS([libintl.h]) | ||
| 180 | AC_CHECK_HEADERS([malloc.h]) | ||
| 181 | AC_CHECK_HEADERS([sgtty.h]) | ||
| 182 | AC_CHECK_HEADERS([sys/socket.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 183 | AC_CHECK_HEADERS([syslog.h],, [AC_MSG_ERROR([missing required header])]) | ||
| 184 | AC_CHECK_HEADERS([stddef.h]) | ||
| 185 | |||
| 186 | # initiates bindle tools macros | ||
| 187 | AC_BINDLE(contrib/bindletools) | ||
| 188 | |||
| 189 | # determine PACKAGE_VERSION via Git | ||
| 190 | AC_BINDLE_GIT_PACKAGE_VERSION([contrib/bindletools/build-aux/git-package-version.sh]) | ||
| 191 | |||
| 192 | # custom configure options | ||
| 193 | AC_BINDLE_ENABLE_WARNINGS([-Wno-padded -Wno-unknown-pragmas], [-Wpadded]) | ||
| 194 | |||
| 195 | # Creates outputs | ||
| 196 | AC_CONFIG_FILES([Makefile]) | ||
| 197 | AC_OUTPUT | ||
| 198 | |||
| 199 | # Show local config | ||
| 200 | AC_MSG_NOTICE([ ]) | ||
| 201 | AC_MSG_NOTICE([ Alaska Communications UDP Echo Tools ($PACKAGE_VERSION)]) | ||
| 202 | AC_MSG_NOTICE([ ]) | ||
| 203 | AC_MSG_NOTICE([ Use Warnings $USE_WARNINGS]) | ||
| 204 | AC_MSG_NOTICE([ Use Strict Warnings $USE_STRICTWARNINGS]) | ||
| 205 | AC_MSG_NOTICE([ ]) | ||
| 206 | AC_MSG_NOTICE([ Utilities:]) | ||
| 207 | AC_MSG_NOTICE([ akcom-udpecho yes]) | ||
| 208 | AC_MSG_NOTICE([ akcom-udpechod yes]) | ||
| 209 | AC_MSG_NOTICE([ ]) | ||
| 210 | AC_MSG_NOTICE([ Please send suggestions to: $PACKAGE_BUGREPORT]) | ||
| 211 | AC_MSG_NOTICE([ ]) | ||
| 212 | AC_MSG_NOTICE([ run 'make all']) | ||
| 213 | AC_MSG_NOTICE([ ]) | ||
| 214 | |||
| 215 | # end of configure.ac | ||
diff --git a/contrib/bindletools b/contrib/bindletools new file mode 160000 | |||
| Subproject 87b688e3e9ed26d4be428c860e91553e03c36af | |||
diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 0000000..27e65f1 --- /dev/null +++ b/include/.gitignore | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | /git-package-version-prefix.h | ||
| 2 | /git-package-version.h | ||
| 3 | /git-package-version.txt | ||
diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..6ab5f07 --- /dev/null +++ b/m4/.gitignore | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | /bindle-*.m4 | ||
| 2 | /libtool.m4 | ||
| 3 | /ltoptions.m4 | ||
| 4 | /ltsugar.m4 | ||
| 5 | /ltversion.m4 | ||
| 6 | /lt~obsolete.m4 | ||
diff --git a/src/akcom-udpecho.c b/src/akcom-udpecho.c index 4001d71..5b6d6e9 100644 --- a/src/akcom-udpecho.c +++ b/src/akcom-udpecho.c | |||
| @@ -56,6 +56,10 @@ | |||
| 56 | /////////////// | 56 | /////////////// |
| 57 | #pragma mark - Headers | 57 | #pragma mark - Headers |
| 58 | 58 | ||
| 59 | #ifdef HAVE_CONFIG_H | ||
| 60 | #include <config.h> | ||
| 61 | #endif | ||
| 62 | |||
| 59 | #include <stdint.h> | 63 | #include <stdint.h> |
| 60 | #include <inttypes.h> | 64 | #include <inttypes.h> |
| 61 | #include <stdio.h> | 65 | #include <stdio.h> |
| @@ -153,7 +157,7 @@ int main(int argc, char * argv[]) | |||
| 153 | int c; | 157 | int c; |
| 154 | int opt_index; | 158 | int opt_index; |
| 155 | char * ptr; | 159 | char * ptr; |
| 156 | union my_sa sa; | 160 | //union my_sa sa; |
| 157 | 161 | ||
| 158 | // getopt options | 162 | // getopt options |
| 159 | static char short_opt[] = "d:D:efg:hl:np:P:ru:vV"; | 163 | static char short_opt[] = "d:D:efg:hl:np:P:ru:vV"; |
diff --git a/src/akcom-udpechod.c b/src/akcom-udpechod.c index f7abb0f..2a40013 100644 --- a/src/akcom-udpechod.c +++ b/src/akcom-udpechod.c | |||
| @@ -56,6 +56,10 @@ | |||
| 56 | /////////////// | 56 | /////////////// |
| 57 | #pragma mark - Headers | 57 | #pragma mark - Headers |
| 58 | 58 | ||
| 59 | #ifdef HAVE_CONFIG_H | ||
| 60 | #include <config.h> | ||
| 61 | #endif | ||
| 62 | |||
| 59 | #include <stdint.h> | 63 | #include <stdint.h> |
| 60 | #include <inttypes.h> | 64 | #include <inttypes.h> |
| 61 | #include <stdio.h> | 65 | #include <stdio.h> |
