zephyrus - 2012-03-19

I noticed a few issues during my attempt to compile libupnp 1.6.15 under solaris 10 and 11.

I want to share the found problems and solution to them.

- sed issue with 1.6.15 configure
  /usr/bin/sed balks to complex regular expression in ./configure

- -D_POSIX_PTHREAD_SEMANTICS must be specified to C compiler command
  to pick up correct thread-aware header definitions.

Here is my shell script to invoke configure libupnp-1.6.15 under solaris10 and 11.
(I am using GCC and Oracle Solaris Suite compiler.)
Below is for using gcc. Simply substitute gcc with cc to use
Solaris Suite compiler.

-- quote --
:
#
PATH=/opt/csw/bin:$PATH:/usr/ccs/bin
# With 1.6.15 configure, under solaris 10 and 11, /usr/bin/sed balked saying,
# sed: command garbled: s/^\.// ; s/.*$//
# sed: command garbled: s/^\.\.// ; s/.*$//
# So we need to use different sed. Use /opt/fsw/bin/sed
#
PATH=/opt/sfw/bin:$PATH
export PATH

echo
echo
echo "Is ar found?"
which ar
echo

echo
echo "Which sed?"
echo
which sed

LANG=C
LC_ALL=C
export LANG LC_ALL
CC='gcc -D_POSIX_PTHREAD_SEMANTICS'
MAKE=gmake
# not for sol10 : SED=/opt/csw/bin/sed
# SED=/opt/csw/bin/sed
export CC MAKE
./configure  -prefix=/opt/upnp -enable-debug

-- end quote --

YMMV concerning options to configure command.

Thank you for making this great library. available