1

I'm trying to compile fontconfig and redefine the value FONTCONFIG_FILE allowing to change the fonts.conf path. It is possible by defining the CFLAGS with -DFONTCONFIG_FILE, but i dont find the correct way to write it. Indeed i tried many combination, but none of them works. CFLAGS= -DFONTCONFIG_FILE='"/path_to/fonts.conf"', i tried by adding '\' before each quotes but nothing works i never get: gcc -DFONTCONFIG_FILE='"/path_to/fonts.conf"'

Can someone help on how i can give this define in the CFLAGS to be handled and used by the compiler? BR.

dabrain34
  • 39
  • 2
  • Perhaps you should **add** to `CFLAGS` - `CFLAGS += -DFONTCONFIG_FILE=\"/path/to/fonts.conf\"` – chill Nov 26 '12 at 09:58
  • Possible duplicate of [how to define a string in gcc command line?](http://stackoverflow.com/questions/2410976/how-to-define-a-string-in-gcc-command-line) – jww Dec 25 '15 at 14:18

1 Answers1

0

Thank you for your answer. I'm giving CFLAGS in shell as i call configure with CFLAGS env var. It seems that fontconfig honors user CFLAGS seen that i can see the cflags later on. But I can not get the correctt syntax, as i understood, -DFONTCONFIG_FILE='"/path_to/fonts.conf"'. In the file src/fccfg.c line 1796, you can see that we can set this define to be used in the c function. The best I succeed to get is -DFONTCONFIG_FILE='/pathto/fonts.conf' with CFLAGS+=-DFONTCONFIG_FILE="'"/pathto/fonts.conf"'"

dabrain34
  • 39
  • 2