Attempt to fix makealias usage for build on Mac OS X.

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.
This commit is contained in:
Keith Packard 2006-09-07 15:17:10 -07:00
parent 6cff1dca81
commit f6cfbe16bf
2 changed files with 4 additions and 1 deletions

View File

@ -48,7 +48,6 @@
#include <fontconfig/fontconfig.h> #include <fontconfig/fontconfig.h>
#include <fontconfig/fcprivate.h> #include <fontconfig/fcprivate.h>
#include <fontconfig/fcfreetype.h> #include <fontconfig/fcfreetype.h>
#include "fcalias.h"
#ifndef FC_CONFIG_PATH #ifndef FC_CONFIG_PATH
#define FC_CONFIG_PATH "fonts.conf" #define FC_CONFIG_PATH "fonts.conf"
@ -114,6 +113,8 @@
/* slim_internal.h */ /* slim_internal.h */
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
#define FcPrivate __attribute__((__visibility__("hidden"))) #define FcPrivate __attribute__((__visibility__("hidden")))
#define HAVE_GNUC_ATTRIBUTE 1
#include "fcalias.h"
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
#define FcPrivate __hidden #define FcPrivate __hidden
#else /* not gcc >= 3.3 and not Sun Studio >= 8 */ #else /* not gcc >= 3.3 and not Sun Studio >= 8 */

View File

@ -4,6 +4,7 @@ shift
HEAD=fcalias.h HEAD=fcalias.h
TAIL=fcaliastail.h TAIL=fcaliastail.h
rm -f $HEAD $TAIL rm -f $HEAD $TAIL
echo "#if HAVE_GNUC_ATTRIBUTE" >> $TAIL
cat "$@" | grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$//' | cat "$@" | grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$//' |
while read name; do while read name; do
case $name in case $name in
@ -22,3 +23,4 @@ while read name; do
;; ;;
esac esac
done done
echo "#endif" >> $TAIL