[mathic] 60/62: Added a C function to library for easier detection from autoconf.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Wed Apr 1 11:36:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository mathic.
commit 60b3ec56afa03aa879c1cbb150a125f3362005d2
Author: Bjarke Hammersholt Roune <bjarkehr.code at gmail.com>
Date: Fri Aug 9 17:00:48 2013 +0200
Added a C function to library for easier detection from autoconf.
---
Makefile.am | 2 +-
src/mathic.cpp | 5 +++++
src/mathic.h | 7 +++++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 1547a41..08b94d1 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ libmathic_la_SOURCES = src/mathic/Timer.cpp \
src/mathic/CliParameter.cpp src/mathic/CliParser.cpp \
src/mathic/error.cpp src/mathic/HelpAction.cpp \
src/mathic/IntegerParameter.cpp src/mathic/StringParameter.cpp \
- src/mathic/display.cpp src/mathic/BitTriangle.cpp
+ src/mathic/display.cpp src/mathic/BitTriangle.cpp src/mathic.cpp
# The headers that libmathic installs.
# Normally, automake strips the path from the files when installing them,
diff --git a/src/mathic.cpp b/src/mathic.cpp
new file mode 100755
index 0000000..2b0f03d
--- /dev/null
+++ b/src/mathic.cpp
@@ -0,0 +1,5 @@
+#include "mathic.h"
+
+extern "C" {
+ void libmathicIsPresent(void) {}
+}
diff --git a/src/mathic.h b/src/mathic.h
index 2e92538..5c70f5b 100755
--- a/src/mathic.h
+++ b/src/mathic.h
@@ -29,3 +29,10 @@
#include "mathic/IntegerParameter.h"
#include "mathic/StringParameter.h"
#include "mathic/display.h"
+
+extern "C" {
+ // Put a C function in the library so that it can be detected by the autoconf
+ // macro AC_CHECK_LIB. That macro can only check for libraries that contain
+ // at least one C function.
+ void libmathicIsPresent(void); // This function does nothing.
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathic.git
More information about the debian-science-commits
mailing list