CHANGE when notifs are off do not require cert and private key
diff --git a/configure.ac b/configure.ac
index 31a2d0d..b62a6b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,30 +60,29 @@
 CFLAGS="-Wall -Wextra $json_CFLAGS $netconf2_CFLAGS $yang_FLAGS $PTHREAD_CFLAGS"
 LIBS="$json_LIBS $netconf2_LIBS $yang_LIBS $PTHREAD_LIBS"
 
+AC_ARG_WITH([notifications],
+    [AC_HELP_STRING([--without-notifications], [Disable notifications])],
+    [AS_IF([test "x$with_notifications" == "xno"],[CFLAGS="$CFLAGS"],
+        [PKG_CHECK_MODULES([websockets], [libwebsockets],
+        [CFLAGS="$CFLAGS $websockets_CFLAGS -DWITH_NOTIFICATIONS" LIBS="$LIBS $websockets_LIBS"])])],
+    [PKG_CHECK_MODULES([websockets], [libwebsockets],
+        [CFLAGS="$CFLAGS $websockets_CFLAGS -DWITH_NOTIFICATIONS" LIBS="$LIBS $websockets_LIBS"])]
+)
+
 AC_ARG_WITH([cert-path],
     AC_HELP_STRING([--with-cert-path], [Set notification server certificate]),
     CERT_PATH="$withval",
-    AC_MSG_ERROR([Certificate path must be set.])
+    [AS_IF([test "x$with_notifications" == "xno"], [], [AC_MSG_ERROR([Certificate path must be set.])])]
 )
 AC_SUBST([CERT_PATH])
 
 AC_ARG_WITH([private-key-path],
     AC_HELP_STRING([--with-private-key-path], [Set notification server private key]),
     PRIVKEY_PATH="$withval",
-    AC_MSG_ERROR([Private key path must be set.])
+    [AS_IF([test "x$with_notifications" == "xno"], [], [AC_MSG_ERROR([Private key path must be set.])])]
 )
 AC_SUBST([PRIVKEY_PATH])
 
-AC_ARG_WITH([notifications],
-[AC_HELP_STRING([--without-notifications], [Disable notifications])],
-[AS_IF([test "x$with_notifications" == "xno"],[CFLAGS="$CFLAGS"],
-[PKG_CHECK_MODULES([websockets], [libwebsockets],
-[CFLAGS="$CFLAGS $websockets_CFLAGS -DWITH_NOTIFICATIONS"
-LIBS="$LIBS $websockets_LIBS"])])],
-[PKG_CHECK_MODULES([websockets], [libwebsockets],
-[CFLAGS="$CFLAGS $websockets_CFLAGS -DWITH_NOTIFICATIONS"
-LIBS="$LIBS $websockets_LIBS"])])
-
 AC_ARG_ENABLE([debug],
     AC_HELP_STRING([--enable-debug],[Compile with debug options]),
     CFLAGS="$CFLAGS -g -O0 -DDBG"