PerBothner / DomTerm

DOM/JavaScript-based terminal-emulator/console

Home Page:https://domterm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile ldomterm on OSX

tsl0922 opened this issue · comments

Just a feedback, changed some hard coded lines (for linux) to make ldomterm compiling on OSX.

diff --git a/autotools-aux/compile b/autotools-aux/compile
index 80e119e..8b93fff 120000
--- a/autotools-aux/compile
+++ b/autotools-aux/compile
@@ -1 +1 @@
-/usr/share/automake-1.15/compile
\ No newline at end of file
+/usr/local/opt/automake/share/automake-1.15/compile
\ No newline at end of file
diff --git a/autotools-aux/missing b/autotools-aux/missing
index 8ecf84a..66e4ccc 120000
--- a/autotools-aux/missing
+++ b/autotools-aux/missing
@@ -1 +1 @@
-/usr/share/automake-1.15/missing
\ No newline at end of file
+/usr/local/opt/automake/share/automake-1.15/missing
\ No newline at end of file
diff --git a/lws-term/Makefile.am b/lws-term/Makefile.am
index 8364e22..0d17401 100644
--- a/lws-term/Makefile.am
+++ b/lws-term/Makefile.am
@@ -13,7 +13,7 @@ LN_H = ln
 LIBWEBSOCKETS_LIBARG = @LIBWEBSOCKETS_LIB@
 bin_PROGRAMS = ldomterm
 ldomterm_SOURCES = server.c utils.c protocol.c http.c io.c whereami.c junzip.c
-ldomterm_CFLAGS = -I/usr/include/json-c -I$(srcdir)/lws-term @LIBWEBSOCKETS_INCLUDES@
+ldomterm_CFLAGS = -I$(shell brew --prefix)/include -I$(shell brew --prefix)/include/json-c -I$(shell brew --prefix openssl)/include -I$(srcdir)/lws-term @LIBWEBSOCKETS_INCLUDES@
 ldomterm_LDADD = $(LIBWEBSOCKETS_LIBARG) -lssl -lcrypto -lpthread -ljson-c -lutil -lz
 #CLIENT_DATA_DIR = @datadir_relative@/domterm
 CLIENT_DATA_DIR = .
diff --git a/lws-term/server.c b/lws-term/server.c
index 57ca657..84d1c32 100644
--- a/lws-term/server.c
+++ b/lws-term/server.c
@@ -7,7 +7,7 @@
 #endif

 #ifndef DEFAULT_BROWSER_COMMAND
-#define DEFAULT_BROWSER_COMMAND "xdg-open"
+#define DEFAULT_BROWSER_COMMAND "open"
 #endif

 #ifndef DEFAULT_ARGV

Thanks - I checked in some configure changes based on your feedback.
Could you check that it works?
It's a bit kludgy (see the test for (which brew>&/dev/null) in configure.ac). Suggestions for improvement welcome. In particular I assume the "open" command is not brew-specific, so it should be set based on a test for MacOS, not brew.