Add a flag --enable-tirpc to the configure script
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 17 Jul 2011 06:32:45 +0000 (16:32 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 17 Jul 2011 06:32:45 +0000 (16:32 +1000)
configure.ac

index 70203ee1594b4b89fa3d20c819c5ed73e1211353..28d29cd96a1e48074c1d219fcfec1ad0ec5e7c2d 100644 (file)
@@ -34,6 +34,12 @@ if test x$ENABLE_EXAMPLES = xyes; then
 fi
 AC_SUBST(MAYBE_EXAMPLES)
 
+AC_ARG_ENABLE(tirpc,
+       [AC_HELP_STRING([--enable-tirpc],
+                       [enable use of TI-RPC @<:@default=no@:>@])],
+       enable_tirpc=$enableval,
+       enable_tirpc='no')
+
 case $host in
   *darwin*)
     RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
@@ -61,6 +67,12 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len],
 #include <sys/socket.h>
 ])
 
+echo "Use TI-RPC: $enable_tirpc"
+if test "$enable_tirpc" = "yes"; then
+       CFLAGS="${CFLAGS} -I /usr/include/tirpc"
+       LDFLAGS="${LDFLAGS} -ltirpc"
+fi
+
 #output
 AC_CONFIG_FILES([Makefile]
                 [include/Makefile]