Skip to content

Commit c24be94

Browse files
committed
Add ./configure --disable-safec option to disable SAFEC explicitly
1 parent 6b17b8e commit c24be94

File tree

4 files changed

+89
-13
lines changed

4 files changed

+89
-13
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.2
1+
1.0.3

aclocal.m4

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8759,6 +8759,43 @@ AC_PREREQ([2.50])dnl
87598759
am_aux_dir=`cd $ac_aux_dir && pwd`
87608760
])
87618761
8762+
# AM_COND_IF -*- Autoconf -*-
8763+
8764+
# Copyright (C) 2008-2013 Free Software Foundation, Inc.
8765+
#
8766+
# This file is free software; the Free Software Foundation
8767+
# gives unlimited permission to copy and/or distribute it,
8768+
# with or without modifications, as long as this notice is preserved.
8769+
8770+
# _AM_COND_IF
8771+
# _AM_COND_ELSE
8772+
# _AM_COND_ENDIF
8773+
# --------------
8774+
# These macros are only used for tracing.
8775+
m4_define([_AM_COND_IF])
8776+
m4_define([_AM_COND_ELSE])
8777+
m4_define([_AM_COND_ENDIF])
8778+
8779+
# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
8780+
# ---------------------------------------
8781+
# If the shell condition COND is true, execute IF-TRUE, otherwise execute
8782+
# IF-FALSE. Allow automake to learn about conditional instantiating macros
8783+
# (the AC_CONFIG_FOOS).
8784+
AC_DEFUN([AM_COND_IF],
8785+
[m4_ifndef([_AM_COND_VALUE_$1],
8786+
[m4_fatal([$0: no such condition "$1"])])dnl
8787+
_AM_COND_IF([$1])dnl
8788+
if test -z "$$1_TRUE"; then :
8789+
m4_n([$2])[]dnl
8790+
m4_ifval([$3],
8791+
[_AM_COND_ELSE([$1])dnl
8792+
else
8793+
$3
8794+
])dnl
8795+
_AM_COND_ENDIF([$1])dnl
8796+
fi[]dnl
8797+
])
8798+
87628799
# AM_CONDITIONAL -*- Autoconf -*-
87638800
87648801
# Copyright (C) 1997-2013 Free Software Foundation, Inc.

configure

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for openosc 1.0.2.
3+
# Generated by GNU Autoconf 2.69 for openosc 1.0.3.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
590590
# Identity of this package.
591591
PACKAGE_NAME='openosc'
592592
PACKAGE_TARNAME='openosc'
593-
PACKAGE_VERSION='1.0.2'
594-
PACKAGE_STRING='openosc 1.0.2'
593+
PACKAGE_VERSION='1.0.3'
594+
PACKAGE_STRING='openosc 1.0.3'
595595
PACKAGE_BUGREPORT='[email protected]'
596596
PACKAGE_URL=''
597597

@@ -767,6 +767,7 @@ ac_user_opts='
767767
enable_option_checking
768768
enable_silent_rules
769769
enable_dependency_tracking
770+
enable_safec
770771
enable_shared
771772
enable_static
772773
with_pic
@@ -1328,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
13281329
# Omit some internal or obsolete options to make the list less imposing.
13291330
# This message is too long to be a string in the A/UX 3.1 sh.
13301331
cat <<_ACEOF
1331-
\`configure' configures openosc 1.0.2 to adapt to many kinds of systems.
1332+
\`configure' configures openosc 1.0.3 to adapt to many kinds of systems.
13321333

13331334
Usage: $0 [OPTION]... [VAR=VALUE]...
13341335

@@ -1398,7 +1399,7 @@ fi
13981399

13991400
if test -n "$ac_init_help"; then
14001401
case $ac_init_help in
1401-
short | recursive ) echo "Configuration of openosc 1.0.2:";;
1402+
short | recursive ) echo "Configuration of openosc 1.0.3:";;
14021403
esac
14031404
cat <<\_ACEOF
14041405

@@ -1412,6 +1413,7 @@ Optional Features:
14121413
do not reject slow dependency extractors
14131414
--disable-dependency-tracking
14141415
speeds up one-time build
1416+
--disable-safec Disable feature SafeC
14151417
--enable-shared[=PKGS] build shared libraries [default=yes]
14161418
--enable-static[=PKGS] build static libraries [default=yes]
14171419
--enable-fast-install[=PKGS]
@@ -1506,7 +1508,7 @@ fi
15061508
test -n "$ac_init_help" && exit $ac_status
15071509
if $ac_init_version; then
15081510
cat <<\_ACEOF
1509-
openosc configure 1.0.2
1511+
openosc configure 1.0.3
15101512
generated by GNU Autoconf 2.69
15111513

15121514
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1996,7 +1998,7 @@ cat >config.log <<_ACEOF
19961998
This file contains any messages produced by compilers while
19971999
running configure, to aid debugging if configure makes a mistake.
19982000

1999-
It was created by openosc $as_me 1.0.2, which was
2001+
It was created by openosc $as_me 1.0.3, which was
20002002
generated by GNU Autoconf 2.69. Invocation command line was
20012003

20022004
$ $0 $@
@@ -2859,7 +2861,7 @@ fi
28592861

28602862
# Define the identity of the package.
28612863
PACKAGE='openosc'
2862-
VERSION='1.0.2'
2864+
VERSION='1.0.3'
28632865

28642866

28652867
cat >>confdefs.h <<_ACEOF
@@ -5229,6 +5231,18 @@ if test "$am_t" != yes; then
52295231
fi
52305232

52315233

5234+
# Check whether --enable-safec was given.
5235+
if test "${enable_safec+set}" = set; then :
5236+
enableval=$enable_safec;
5237+
fi
5238+
5239+
if test "x$enable_safec" != "xno"; then :
5240+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The safec feature is not disabled" >&5
5241+
$as_echo "$as_me: The safec feature is not disabled" >&6;}
5242+
else
5243+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The safec feature is disabled" >&5
5244+
$as_echo "$as_me: The safec feature is disabled" >&6;}
5245+
fi
52325246
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in -ldl" >&5
52335247
$as_echo_n "checking for dladdr in -ldl... " >&6; }
52345248
if ${ac_cv_lib_dl_dladdr+:} false; then :
@@ -5748,14 +5762,28 @@ else
57485762
OPENOSC_TEST_CXX_PROG_FALSE=
57495763
fi
57505764

5751-
if test "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safe_lib_h" = xyes -o "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safec_safe_lib_h" = xyes; then
5765+
if test -z "$OPENOSC_TEST_CXX_PROG_TRUE"; then :
5766+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The unit-test C++ code coverage is ON" >&5
5767+
$as_echo "$as_me: The unit-test C++ code coverage is ON" >&6;}
5768+
else
5769+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The unit-test C++ code coverage is OFF" >&5
5770+
$as_echo "$as_me: The unit-test C++ code coverage is OFF" >&6;}
5771+
fi
5772+
if test "x$enable_safec" != xno -a "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safe_lib_h" = xyes -o "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safec_safe_lib_h" = xyes; then
57525773
HAS_SAFEC_TRUE=
57535774
HAS_SAFEC_FALSE='#'
57545775
else
57555776
HAS_SAFEC_TRUE='#'
57565777
HAS_SAFEC_FALSE=
57575778
fi
57585779

5780+
if test -z "$HAS_SAFEC_TRUE"; then :
5781+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The safec coverage is ON" >&5
5782+
$as_echo "$as_me: The safec coverage is ON" >&6;}
5783+
else
5784+
{ $as_echo "$as_me:${as_lineno-$LINENO}: The safec coverage is OFF" >&5
5785+
$as_echo "$as_me: The safec coverage is OFF" >&6;}
5786+
fi
57595787
if test a = b; then
57605788
OPENOSC_TEST_HARNESS_WANT_COMPILE_TIME_CHECK_TRUE=
57615789
OPENOSC_TEST_HARNESS_WANT_COMPILE_TIME_CHECK_FALSE='#'
@@ -16710,7 +16738,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1671016738
# report actual input values of CONFIG_FILES etc. instead of their
1671116739
# values after options handling.
1671216740
ac_log="
16713-
This file was extended by openosc $as_me 1.0.2, which was
16741+
This file was extended by openosc $as_me 1.0.3, which was
1671416742
generated by GNU Autoconf 2.69. Invocation command line was
1671516743

1671616744
CONFIG_FILES = $CONFIG_FILES
@@ -16776,7 +16804,7 @@ _ACEOF
1677616804
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1677716805
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1677816806
ac_cs_version="\\
16779-
openosc config.status 1.0.2
16807+
openosc config.status 1.0.3
1678016808
configured by $0, generated by GNU Autoconf 2.69,
1678116809
with options \\"\$ac_cs_config\\"
1678216810

configure.ac

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ AM_PROG_AR
66
AC_PROG_CC
77
AC_PROG_CXX
88
AM_PROG_CC_C_O
9+
AC_ARG_ENABLE([safec],
10+
AS_HELP_STRING([--disable-safec], [Disable feature SafeC]))
11+
AS_IF([test "x$enable_safec" != "xno"],
12+
[AC_MSG_NOTICE([The safec feature is not disabled])],
13+
[AC_MSG_NOTICE([The safec feature is disabled])])
914
AC_CHECK_LIB([dl], [dladdr])
1015
AC_CHECK_LIB([ciscosafec], [memcpy_s])
1116
AC_CHECK_HEADERS([safe_lib.h])
1217
AC_CHECK_HEADERS([safec/safe_lib.h])
1318
AM_CONDITIONAL([OPENOSC_TEST_CXX_PROG], [test "x$ac_cv_prog_cxx_g" = xyes])
14-
AM_CONDITIONAL([HAS_SAFEC], [test "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safe_lib_h" = xyes -o "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safec_safe_lib_h" = xyes])
19+
AM_COND_IF([OPENOSC_TEST_CXX_PROG],
20+
[AC_MSG_NOTICE([The unit-test C++ code coverage is ON])],
21+
[AC_MSG_NOTICE([The unit-test C++ code coverage is OFF])])
22+
AM_CONDITIONAL([HAS_SAFEC], [test "x$enable_safec" != xno -a "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safe_lib_h" = xyes -o "x$ac_cv_lib_ciscosafec_memcpy_s" = xyes -a "x$ac_cv_header_safec_safe_lib_h" = xyes])
23+
AM_COND_IF([HAS_SAFEC],
24+
[AC_MSG_NOTICE([The safec coverage is ON])],
25+
[AC_MSG_NOTICE([The safec coverage is OFF])])
1526
AM_CONDITIONAL([OPENOSC_TEST_HARNESS_WANT_COMPILE_TIME_CHECK], [test a = b])
1627
LT_INIT
1728
LT_VERSION_NUMBER="0:0:0"

0 commit comments

Comments
 (0)