]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
build infrastructure updates
authorHarlan Stenn <stenn@ntp.org>
Tue, 22 Jul 2008 20:12:19 +0000 (16:12 -0400)
committerHarlan Stenn <stenn@ntp.org>
Tue, 22 Jul 2008 20:12:19 +0000 (16:12 -0400)
bk: 48863f23f_pqy0U8CsmBTh6x_wp4Pg

gsoc_sntp/:fetch-stubs
gsoc_sntp/configure.ac [new file with mode: 0644]

index 7704df76bda154c886c085c0c10f89b47ea8a3f0..b1166824d4a98455b32ba3f8d1fb1c69225325cd 100755 (executable)
@@ -7,7 +7,14 @@ STUB="sntp-opts.menu $STUB"
 STUB="sntp-opts.texi $STUB"
 STUB="sntp.1 $STUB"
 
+set -x
+
 for i in $STUB
 do
        cp ../sntp/$i .
 done
+
+test -f bincheck.mf            || cp ../bincheck.mf .
+test -f autogen-version.def    || cp ../include/autogen-version.def .
+test -f version.def            || cp ../include/version.def .
+test -f version.m4             || cp ../version.m4 .
diff --git a/gsoc_sntp/configure.ac b/gsoc_sntp/configure.ac
new file mode 100644 (file)
index 0000000..6f734d4
--- /dev/null
@@ -0,0 +1,89 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+m4_include([version.m4])
+AC_INIT(sntp, VERSION_NUMBER)
+AM_INIT_AUTOMAKE
+AC_CANONICAL_HOST
+dnl the 'build' machine is where we run configure and compile
+dnl the 'host' machine is where the resulting stuff runs.
+AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) of where we should run])
+AC_CONFIG_HEADER([config.h])
+dnl AC_ARG_PROGRAM
+AC_PREREQ(2.53)
+
+dnl AC_PREREQ(2.61)
+dnl AC_CONFIG_SRCDIR([main.c])
+
+# Checks for programs.
+AC_PROG_CC
+
+# NTP has (so far) been relying on leading-edge autogen.
+# Therefore, by default:
+# - use the version we ship with
+# - do not install it
+# - build a static copy (AC_DISABLE_SHARED - done earlier)
+case "${enable_local_libopts+set}" in
+ set) ;;
+ *) enable_local_libopts=yes ;;
+esac
+case "${enable_libopts_install+set}" in
+ set) ;;
+ *) enable_libopts_install=no ;;
+esac
+LIBOPTS_CHECK(libopts)
+
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h syslog.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_TYPE_SIZE_T
+
+AC_C_INLINE
+AC_C_CHAR_UNSIGNED             dnl CROSS_COMPILE?
+AC_CHECK_SIZEOF(signed char)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+AC_CHECK_TYPES([s_char])
+case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
+ *yes)
+    # We have a typedef for s_char.  Might as well believe it...
+    ;;
+ no0no)
+    # We have signed chars, can't say 'signed char', no s_char typedef.
+    AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
+    ;;
+ no1no)
+    # We have signed chars, can say 'signed char', no s_char typedef.
+    AC_DEFINE(NEED_S_CHAR_TYPEDEF)
+    ;;
+ yes0no)
+    # We have unsigned chars, can't say 'signed char', no s_char typedef.
+    AC_MSG_ERROR(No way to specify a signed character!)
+    ;;
+ yes1no)
+    # We have unsigned chars, can say 'signed char', no s_char typedef.
+    AC_DEFINE(NEED_S_CHAR_TYPEDEF)
+    ;;
+esac
+AC_TYPE_UID_T
+
+# Hacks
+AC_DEFINE(HAVE_NO_NICE, 1, [sntp does not care about 'nice'])
+AC_DEFINE(HAVE_TERMIOS, 1, [sntp does not care about TTY stuff])
+
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_CHECK_FUNCS([atexit memset socket])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT