More flexible definition of PREFIX

This commit is contained in:
Pierre Pronchery 2006-11-01 21:01:48 +00:00
parent 9e866e122f
commit 9429450960

View File

@ -119,7 +119,8 @@ static int _do_h(Prefs * prefs, Config * config, FILE * fp,
"#define VERSION \"", version, "\"\n");
if((p = prefs->prefix) != NULL || (p = config_get(config, "", "prefix"))
!= NULL)
fprintf(fp, "%s%s%s", "\n#define PREFIX \"", p, "\"\n");
fprintf(fp, "%s%s%s", "\n#ifndef PREFIX\n\
# define PREFIX \"", p, "\"\n#endif\n");
return 0;
}