diff --git a/configure.ac b/configure.ac index 186e0bf..506dbc3 100644 --- a/configure.ac +++ b/configure.ac @@ -128,15 +128,17 @@ AC_ARG_WITH([uriparser-dir], ] ) -SAFEC_STUB_DIR='$(abs_top_builddir)/safe_c_stub' -AC_SUBST(SAFEC_STUB_DIR) -safecdir="$SAFEC_STUB_DIR" -AC_SUBST([SAFEC_DIR], "$safecdir") -AC_SUBST([SAFEC_CFLAGS], "$safecdir/include") -AC_SUBST([SAFEC_LDFLAGS], "$safecdir/lib") - -CFLAGS="$CFLAGS -Wall -I$safecdir/include" -LDFLAGS="$LDFLAGS -L$safecdir/lib" +SAFEC_STUB_SRCDIR='$(abs_top_srcdir)/safe_c_stub' +SAFEC_STUB_BLDDIR='$(abs_top_builddir)/safe_c_stub' +AC_SUBST(SAFEC_STUB_SRCDIR) +safecsrcdir="$SAFEC_STUB_SRCDIR" +safecblddir="$SAFEC_STUB_BLDDIR" +AC_SUBST([SAFEC_DIR], "$safecsrcdir") +AC_SUBST([SAFEC_CFLAGS], "$safecsrcdir/include") +AC_SUBST([SAFEC_LDFLAGS], "$safecblddir/lib") + +CFLAGS="$CFLAGS -Wall -I$safecsrcdir/include" +LDFLAGS="$LDFLAGS -L$safecblddir/lib" LIBS="$LIBS -lsafe_lib" AC_PREFIX_DEFAULT([/usr/local/est]) diff --git a/example/client-simple/Makefile.am b/example/client-simple/Makefile.am index c7eb0cd..cc8e2d5 100644 --- a/example/client-simple/Makefile.am +++ b/example/client-simple/Makefile.am @@ -7,4 +7,4 @@ DL= else DL=-ldl endif -estclient_simple_LDFLAGS = -L../../src/est/.libs $(DL) -lest -lssl -lcrypto +estclient_simple_LDFLAGS = -L$(abs_top_builddir)/src/est/.libs $(DL) -lest -lssl -lcrypto diff --git a/example/client/Makefile.am b/example/client/Makefile.am index 6b24fb9..7342d4c 100644 --- a/example/client/Makefile.am +++ b/example/client/Makefile.am @@ -14,4 +14,4 @@ else PTHREAD=-lpthread endif -estclient_LDFLAGS = -L../../src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto \ No newline at end of file +estclient_LDFLAGS = -L$(abs_top_builddir)/src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto diff --git a/example/proxy/Makefile.am b/example/proxy/Makefile.am index 5b1e629..b1dedfb 100644 --- a/example/proxy/Makefile.am +++ b/example/proxy/Makefile.am @@ -13,6 +13,6 @@ else PTHREAD=-lpthread endif -estproxy_LDFLAGS = -L../../src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto +estproxy_LDFLAGS = -L$(abs_top_builddir)/src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto EXTRA_DIST = createRA.sh runproxy.sh estExampleCA.cnf diff --git a/example/server/Makefile.am b/example/server/Makefile.am index ca7d111..0e0cb5f 100644 --- a/example/server/Makefile.am +++ b/example/server/Makefile.am @@ -14,6 +14,6 @@ else PTHREAD=-lpthread endif -estserver_LDFLAGS = -L../../src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto +estserver_LDFLAGS = -L$(abs_top_builddir)/src/est/.libs $(DL) $(PTHREAD) -lest -lssl -lcrypto EXTRA_DIST = ossl_srv.h apps.h createCA.sh ext.cnf ESTcommon.sh runserver.sh estExampleCA.cnf extExampleCA.cnf