Module: xenomai-gch
Branch: for-head
Commit: ec07c72a8e930fa5b7f12370fde77abc76665148
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=ec07c72a8e930fa5b7f12370fde77abc76665148

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed Dec  2 22:22:56 2009 +0100

sigtest: only compile sigtest with -rdynamic if shared libraries are enabled

---

 configure                         |   44 +++++++++++++++++++++++++-----------
 configure.in                      |    2 +-
 src/testsuite/sigtest/Makefile.am |    5 +++-
 src/testsuite/sigtest/Makefile.in |    4 ++-
 4 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/configure b/configure
index 01a8570..dadd637 100755
--- a/configure
+++ b/configure
@@ -806,6 +806,8 @@ DOXYGEN_SHOW_INCLUDE_FILES
 LD_FILE_OPTION
 CONFIG_XENO_DOC_DOX_FALSE
 CONFIG_XENO_DOC_DOX_TRUE
+CONFIG_XENO_SHARED_FALSE
+CONFIG_XENO_SHARED_TRUE
 CONFIG_XENO_FASTSYNCH_FALSE
 CONFIG_XENO_FASTSYNCH_TRUE
 DBX_ABS_SRCDIR_FALSE
@@ -6239,13 +6241,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:6242: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:6244: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6245: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:6247: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6248: output\"" >&5)
+  (eval echo "\"\$as_me:6250: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7343,7 +7345,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7346 "configure"' > conftest.$ac_ext
+  echo '#line 7348 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8934,11 +8936,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8937: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8939: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8941: \$? = $ac_status" >&5
+   echo "$as_me:8943: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9258,11 +9260,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9261: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9263: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9265: \$? = $ac_status" >&5
+   echo "$as_me:9267: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9363,11 +9365,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9366: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9368: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9370: \$? = $ac_status" >&5
+   echo "$as_me:9372: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9418,11 +9420,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9421: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9423: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9425: \$? = $ac_status" >&5
+   echo "$as_me:9427: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12223,7 +12225,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12226 "configure"
+#line 12228 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12323,7 +12325,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12326 "configure"
+#line 12328 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13649,6 +13651,13 @@ cat >>confdefs.h <<\_ACEOF
 #define CONFIG_XENO_ARM_EABI 1
 _ACEOF
 
+ if test "$enable_shared" = 'yes'; then
+  CONFIG_XENO_SHARED_TRUE=
+  CONFIG_XENO_SHARED_FALSE='#'
+else
+  CONFIG_XENO_SHARED_TRUE='#'
+  CONFIG_XENO_SHARED_FALSE=
+fi
 
 
 # Default sampling period (ns) used in various tests
@@ -14404,6 +14413,13 @@ $as_echo "$as_me: error: conditional 
\"CONFIG_XENO_FASTSYNCH\" was never defined
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${CONFIG_XENO_SHARED_TRUE}" && test -z 
"${CONFIG_XENO_SHARED_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_XENO_SHARED\" was 
never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"CONFIG_XENO_SHARED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${CONFIG_XENO_DOC_DOX_TRUE}" && test -z 
"${CONFIG_XENO_DOC_DOX_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_XENO_DOC_DOX\" was 
never defined.
 Usually this means the macro was only invoked conditionally." >&5
diff --git a/configure.in b/configure.in
index 37d1ad2..cc2945e 100644
--- a/configure.in
+++ b/configure.in
@@ -629,7 +629,7 @@ test x$CONFIG_XENO_ARM_SA1100 = xy && 
AC_DEFINE(CONFIG_XENO_ARM_SA1100,1,[config
 test x$CONFIG_XENO_CPU_XSC3 = xy && AC_DEFINE(CONFIG_XENO_CPU_XSC3,1,[config])
 test $XNARCH_ARM_TSC_TYPE && 
AC_DEFINE_UNQUOTED(XNARCH_ARM_TSC_TYPE,$XNARCH_ARM_TSC_TYPE,[config])
 test x$CONFIG_XENO_ARM_EABI = xy && AC_DEFINE(CONFIG_XENO_ARM_EABI,1,[config])
-
+AM_CONDITIONAL(CONFIG_XENO_SHARED,[test "$enable_shared" = 'yes'])
 
 # Default sampling period (ns) used in various tests
 
AC_DEFINE_UNQUOTED(CONFIG_XENO_DEFAULT_PERIOD,$CONFIG_XENO_DEFAULT_PERIOD,[config])
diff --git a/src/testsuite/sigtest/Makefile.am 
b/src/testsuite/sigtest/Makefile.am
index 9d7a342..a2f20bd 100644
--- a/src/testsuite/sigtest/Makefile.am
+++ b/src/testsuite/sigtest/Makefile.am
@@ -8,7 +8,10 @@ sigtest_SOURCES = sigtest.c
 
 sigtest_CPPFLAGS = -I$(top_srcdir)/include/posix $(XENO_USER_CFLAGS) -g 
-I$(top_srcdir)/include
 
-sigtest_LDFLAGS =  $(XENO_POSIX_WRAPPERS) $(XENO_USER_LDFLAGS) -rdynamic
+sigtest_LDFLAGS =  $(XENO_POSIX_WRAPPERS) $(XENO_USER_LDFLAGS)
+if CONFIG_XENO_SHARED
+sigtest_LDFLAGS += -rdynamic
+endif
 
 sigtest_LDADD = \
        ../../skins/posix/libpthread_rt.la -lpthread -lrt
diff --git a/src/testsuite/sigtest/Makefile.in 
b/src/testsuite/sigtest/Makefile.in
index 111096f..5326180 100644
--- a/src/testsuite/sigtest/Makefile.in
+++ b/src/testsuite/sigtest/Makefile.in
@@ -34,6 +34,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 bin_PROGRAMS = sigtest$(EXEEXT)
+...@config_xeno_shared_true@am__append_1 = -rdynamic
 subdir = src/testsuite/sigtest
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -237,7 +238,8 @@ testdir = $(exec_prefix)/share/xenomai/testsuite/sigtest
 CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 sigtest_SOURCES = sigtest.c
 sigtest_CPPFLAGS = -I$(top_srcdir)/include/posix $(XENO_USER_CFLAGS) -g 
-I$(top_srcdir)/include
-sigtest_LDFLAGS = $(XENO_POSIX_WRAPPERS) $(XENO_USER_LDFLAGS) -rdynamic
+sigtest_LDFLAGS = $(XENO_POSIX_WRAPPERS) $(XENO_USER_LDFLAGS) \
+       $(am__append_1)
 sigtest_LDADD = \
        ../../skins/posix/libpthread_rt.la -lpthread -lrt
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to