]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add check for finding libgcc.
authorAndres Mejia <amejia004@gmail.com>
Tue, 5 Feb 2013 22:51:11 +0000 (17:51 -0500)
committerAndres Mejia <amejia004@gmail.com>
Tue, 5 Feb 2013 22:51:11 +0000 (17:51 -0500)
build/cmake/FindLibGCC.cmake [new file with mode: 0644]
build/cmake/config.h.in

diff --git a/build/cmake/FindLibGCC.cmake b/build/cmake/FindLibGCC.cmake
new file mode 100644 (file)
index 0000000..5883ff8
--- /dev/null
@@ -0,0 +1,22 @@
+# - Find libgcc\r
+# Find the libgcc library.\r
+#\r
+#  LIBGCC_LIBRARIES      - List of libraries when using libgcc\r
+#  LIBGCC_FOUND          - True if libgcc found.\r
+\r
+IF (LIBGCC_LIBRARY)\r
+  # Already in cache, be silent\r
+  SET(LIBGCC_FIND_QUIETLY TRUE)\r
+ENDIF (LIBGCC_LIBRARY)\r
+\r
+FIND_LIBRARY(LIBGCC_LIBRARY NAMES gcc libgcc)\r
+\r
+# handle the QUIETLY and REQUIRED arguments and set LIBGCC_FOUND to TRUE if \r
+# all listed variables are TRUE\r
+INCLUDE(FindPackageHandleStandardArgs)\r
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGCC DEFAULT_MSG LIBGCC_LIBRARY)\r
+\r
+IF(LIBGCC_FOUND)\r
+  SET(LIBGCC_LIBRARIES ${LIBGCC_LIBRARY})\r
+  SET(HAVE_LIBGCC 1)\r
+ENDIF(LIBGCC_FOUND)\r
index 50faae5c106f68851174c8fefb89e347717bd0cc..c04314ee5e326e291178718786b0c878cd4ae091 100644 (file)
@@ -579,6 +579,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the `expat' library (-lexpat). */
 #cmakedefine HAVE_LIBEXPAT 1
 
+/* Define to 1 if you have the `gcc' library (-lgcc). */
+#cmakedefine HAVE_LIBGCC 1
+
 /* Define to 1 if you have the `lzma' library (-llzma). */
 #cmakedefine HAVE_LIBLZMA 1