From: Andres Mejia Date: Tue, 5 Feb 2013 22:51:11 +0000 (-0500) Subject: Add check for finding libgcc. X-Git-Tag: v3.1.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a01cfe6ef968c606b4f52c6a67baa2a061979f42;p=thirdparty%2Flibarchive.git Add check for finding libgcc. --- diff --git a/build/cmake/FindLibGCC.cmake b/build/cmake/FindLibGCC.cmake new file mode 100644 index 000000000..5883ff802 --- /dev/null +++ b/build/cmake/FindLibGCC.cmake @@ -0,0 +1,22 @@ +# - Find libgcc +# Find the libgcc library. +# +# LIBGCC_LIBRARIES - List of libraries when using libgcc +# LIBGCC_FOUND - True if libgcc found. + +IF (LIBGCC_LIBRARY) + # Already in cache, be silent + SET(LIBGCC_FIND_QUIETLY TRUE) +ENDIF (LIBGCC_LIBRARY) + +FIND_LIBRARY(LIBGCC_LIBRARY NAMES gcc libgcc) + +# handle the QUIETLY and REQUIRED arguments and set LIBGCC_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGCC DEFAULT_MSG LIBGCC_LIBRARY) + +IF(LIBGCC_FOUND) + SET(LIBGCC_LIBRARIES ${LIBGCC_LIBRARY}) + SET(HAVE_LIBGCC 1) +ENDIF(LIBGCC_FOUND) diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in index 50faae5c1..c04314ee5 100644 --- a/build/cmake/config.h.in +++ b/build/cmake/config.h.in @@ -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