[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19231 - in gnunet-update/test/new/test-package: . src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19231 - in gnunet-update/test/new/test-package: . src |
Date: |
Wed, 18 Jan 2012 13:47:16 +0100 |
Author: harsha
Date: 2012-01-18 13:47:16 +0100 (Wed, 18 Jan 2012)
New Revision: 19231
Modified:
gnunet-update/test/new/test-package/configure.ac
gnunet-update/test/new/test-package/src/Makefile.am
gnunet-update/test/new/test-package/src/test-binary.c
Log:
- added support for linking external library
Modified: gnunet-update/test/new/test-package/configure.ac
===================================================================
--- gnunet-update/test/new/test-package/configure.ac 2012-01-18 12:42:09 UTC
(rev 19230)
+++ gnunet-update/test/new/test-package/configure.ac 2012-01-18 12:47:16 UTC
(rev 19231)
@@ -40,5 +40,27 @@
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
+# Checks for options
+libfake=0
+AC_ARG_WITH([libfake],
+ AS_HELP_STRING([--with-libfake],[Links the code with libfake external
+ library @<:@default=disable@:>@]),
+ [case $with_libfake in
+ no)
+ ;;
+ yes)
+ AC_CHECK_HEADERS(libfake.h,
+ libfake=1,
+ AC_MSG_ERROR([--with-libfake specified but libfake.h
+ not found]))
+ ;;
+ *)
+ AC_DEFINE([HAVE_LIBFAKE_H],[1],[Have libfake])
+ LDFLAGS="-L$with_libfake/lib $LDFLAGS"
+ CPPFLAGS="-I$with_libfake/include $CPPFLAGS"
+ libfake=1
+ esac
+ ])
+AM_CONDITIONAL([LIBFAKE], [test "$libfake" == 1])
AC_OUTPUT
Modified: gnunet-update/test/new/test-package/src/Makefile.am
===================================================================
--- gnunet-update/test/new/test-package/src/Makefile.am 2012-01-18 12:42:09 UTC
(rev 19230)
+++ gnunet-update/test/new/test-package/src/Makefile.am 2012-01-18 12:47:16 UTC
(rev 19231)
@@ -59,6 +59,10 @@
test_binary_SOURCES = test-binary.c
+if LIBFAKE
+test_binary_LDADD = -lfake
+endif
+
test_binary_new_SOURCES = test-binary-new.c
test_binary_modified_SOURCES = test-binary-modified.c
Modified: gnunet-update/test/new/test-package/src/test-binary.c
===================================================================
--- gnunet-update/test/new/test-package/src/test-binary.c 2012-01-18
12:42:09 UTC (rev 19230)
+++ gnunet-update/test/new/test-package/src/test-binary.c 2012-01-18
12:47:16 UTC (rev 19231)
@@ -24,11 +24,21 @@
* @author harsha
*/
+#include "../config.h"
+
+#ifdef HAVE_LIBFAKE_H
+#include <libfake.h>
+#endif
+
/**
* The main execution function
*/
int main ()
{
+#ifdef HAVE_LIBFAKE_H
+ return FAKE_function();
+#else
return 0;
+#endif
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19231 - in gnunet-update/test/new/test-package: . src,
gnunet <=