diff --git a/Makefile b/Makefile index 6683fb1..cf890c7 100644 --- a/Makefile +++ b/Makefile @@ -66,13 +66,9 @@ INSTALL_PROG=$(INSTALL) -m755 INSTALL_DOC=$(INSTALL) -m644 # DESTDIR set in debian make system -PREFIX?=$(DESTDIR)/usr -ifeq ($(CONFIG_TARGET),darwin) -SBINDIR=$(PREFIX)/local/sbin -else -SBINDIR=$(PREFIX)/sbin -endif +PREFIX?=$(DESTDIR)/$(CONFIG_PREFIX) +SBINDIR=$(PREFIX)/sbin MANDIR?=$(PREFIX)/share/man MAN1DIR=$(MANDIR)/man1 MAN7DIR=$(MANDIR)/man7 diff --git a/config.mak.in b/config.mak.in index 7db29d2..8e4f243 100644 --- a/config.mak.in +++ b/config.mak.in @@ -2,6 +2,8 @@ # @configure_input@ CONFIG_HOST=@host@ +CONFIG_PREFIX=@prefix@ + PACKAGE_VERSION=@PACKAGE_VERSION@ CC=@CC@ AR=@AR@ diff --git a/configure.ac b/configure.ac index b4c5604..b22449a 100644 --- a/configure.ac +++ b/configure.ac @@ -13,13 +13,24 @@ AC_CHECK_TOOL([AR], [ar], [false]) AC_CHECK_TOOL([WINDRES], [windres], [windres]) case "$host_os" in - *-solaris*) + solaris*) # Was in Makefile with the test `uname` -eq "SunOS" # and comment "For OpenSolaris (Solaris too?)" LIBS="-lsocket -lnsl $LIBS" ;; esac +# This replicates the old config logic from the Makefile. +# TODO: remove all this and just use the autotools default prefix +# (which is "/usr/local") +case "$host_os" in + darwin*) + ;; + *) + AC_PREFIX_DEFAULT(/usr) + ;; +esac + # TODO: ideally, should use AC_ARG_ENABLE AC_ARG_WITH([edgex], AS_HELP_STRING([--with-edgex], [Build for Ubiquity-X]),