Add openssl paths for homebrew/ports for osx.

These are the default paths openssl should be installed under
for both projects. This at least kills the need for user CFLAGS
for a normal build.

Inspired by #70.
This commit is contained in:
Joris Vink 2015-06-28 13:43:01 +02:00
parent a64808c6b0
commit 4dff0b57ae
1 changed files with 7 additions and 5 deletions

View File

@ -879,7 +879,7 @@ cli_compile_cfile(void *arg)
int idx, f, i;
struct cfile *cf = arg;
char *flags[CFLAGS_MAX], *p;
char *args[30 + CFLAGS_MAX], *ipath[2], *cppstandard;
char *args[32 + CFLAGS_MAX], *ipath[2], *cppstandard;
#if defined(KORE_USE_PGSQL)
char *ppath;
#endif
@ -887,10 +887,6 @@ cli_compile_cfile(void *arg)
(void)cli_vasprintf(&ipath[0], "-I%s/src", rootdir);
(void)cli_vasprintf(&ipath[1], "-I%s/src/includes", rootdir);
/*
* These compiler options should be settable
* somehow by the user if they so choose.
*/
idx = 0;
args[idx++] = compiler;
args[idx++] = ipath[0];
@ -901,6 +897,12 @@ cli_compile_cfile(void *arg)
args[idx++] = "-I/usr/local/include";
#endif
#if defined(__MACH__)
/* Add default openssl include path from homebrew / ports under OSX. */
args[idx++] = "-I/opt/local/include";
args[idx++] = "-I/usr/local/opt/openssl/include";
#endif
/* Add any user specified flags. */
if ((p = getenv("CFLAGS")) != NULL)
f = kore_split_string(p, " ", flags, CFLAGS_MAX);