]> git.wh0rd.org - fontconfig.git/commitdiff
Attempt to fix makealias usage for build on Mac OS X.
authorKeith Packard <keithp@neko.keithp.com>
Thu, 7 Sep 2006 22:17:10 +0000 (15:17 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Thu, 7 Sep 2006 22:17:10 +0000 (15:17 -0700)
Avoid using fcalias.h or fcaliastail.h on systems which don't support it.
Provided solution still generates these files, but does not use them.

src/fcint.h
src/makealias

index c50f623bd7651495c05719e3ec96e9189867546e..afa37d2cbd3235e4c2c72a4d17905879ec70b8ed 100644 (file)
@@ -48,7 +48,6 @@
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcprivate.h>
 #include <fontconfig/fcfreetype.h>
-#include "fcalias.h"
 
 #ifndef FC_CONFIG_PATH
 #define FC_CONFIG_PATH "fonts.conf"
 /* slim_internal.h */
 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
 #define FcPrivate              __attribute__((__visibility__("hidden")))
+#define HAVE_GNUC_ATTRIBUTE 1
+#include "fcalias.h"
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
 #define FcPrivate              __hidden
 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
index ebbe5596796afc15fe4f813cf1776c1b3595870b..02167b25bdf1cfda21b0839c42fd661d3e3a8214 100755 (executable)
@@ -4,6 +4,7 @@ shift
 HEAD=fcalias.h
 TAIL=fcaliastail.h
 rm -f $HEAD $TAIL
+echo "#if HAVE_GNUC_ATTRIBUTE" >> $TAIL
 cat "$@" | grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$//' |
 while read name; do
        case $name in
@@ -22,3 +23,4 @@ while read name; do
                ;;
        esac
 done
+echo "#endif" >> $TAIL