diff --git a/ChangeLog b/ChangeLog
index 8bdb149262c297f016b378824f6ce0f70284d3b0..05f6817f0543da15523454f7a1681a4479c41487 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-11-20  Russell Bryant <russell@digium.com>
 
+	* Makefile apps/Makefile: Fix 'make install' for Solaris. (issue #5775)
+
 	* apps/app_record.c: Don't leak a frame if writing it to the file fails. (issue #5787)
 
 	* Makefile: Create the monitor spool directory when the other spool directories are created.
diff --git a/Makefile b/Makefile
index 815644f812fc5e6178cc450d78dd7fb8ff975203..69e57fea41b7c0c9f09b40f0210c3848053333f5 100755
--- a/Makefile
+++ b/Makefile
@@ -534,7 +534,7 @@ clean:
 	$(MAKE) -C stdtime clean
 
 datafiles: all
-	if test $$(id -u) = 0; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ x`whoami` = xroot ]; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
 	for x in sounds/digits/*.gsm; do \
diff --git a/apps/Makefile b/apps/Makefile
index 12d503245931fef02a9dc72092396559bbf73d25..6913ef4cb4ee9d0c4e72c231409b7c24a5fbd058 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -59,7 +59,7 @@ CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/us
 endif
 
 CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
-ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
+ifneq ($(shell if [ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]; then echo "OK" ; fi),)
   ifneq (${CURLLIBS},)
     APPS+=app_curl.so
   endif