kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 4dff0b57ae6ed113d15ba3c393e0c985eae365bc
parent a64808c6b01eff40981f5e1b043329304ecb4704
Author: Joris Vink <joris@coders.se>
Date:   Sun, 28 Jun 2015 13:43:01 +0200

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.

Diffstat:
src/cli.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/cli.c b/src/cli.c @@ -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);