summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@dahyabhai.net>2009-04-30 12:25:14 -0400
committerNalin Dahyabhai <nalin@dahyabhai.net>2009-04-30 12:25:14 -0400
commite987275ecd07e8eaf2a41929afce529e0a9745bc (patch)
treea84d1a2d12386bf188dc6735884113a9984f98a0
parentd3096bcee930b107b9317f717859785aacc7b30b (diff)
downloadslapi-nis-e987275ecd07e8eaf2a41929afce529e0a9745bc.tar.gz
slapi-nis-e987275ecd07e8eaf2a41929afce529e0a9745bc.tar.xz
slapi-nis-e987275ecd07e8eaf2a41929afce529e0a9745bc.zip
- handle includedir!=parent-of-parent-of-directory-with-yp.x
-rw-r--r--configure.ac11
-rw-r--r--tests/clients/Makefile.am2
2 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 15276fc..7b8da2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,6 +132,17 @@ AC_SUBST(myplugindir)
AC_SUBST(mydomain)
AC_SUBST(mysuffix)
+myincludedir=`eval echo "$includedir" | sed "s,NONE,${ac_default_prefix},g"`
+myincludedir=`eval echo "$myincludedir" | sed "s,NONE,${ac_prefix},g"`
+AC_MSG_CHECKING([for yp.x])
+if test -s $myincludedir/rpcsvc/yp.x ; then
+ yp_x_include_dir=$myincludedir
+else
+ yp_x_include_dir=/usr/include
+fi
+AC_MSG_RESULT($yp_x_include_dir/rpcsvc/yp.x)
+AC_SUBST(yp_x_include_dir)
+
AC_ARG_WITH(users,
AS_HELP_STRING([--with-users=cn=Users],
[select a specific user entry container (cn=Users)]),
diff --git a/tests/clients/Makefile.am b/tests/clients/Makefile.am
index ecc6a82..df0f0b9 100644
--- a/tests/clients/Makefile.am
+++ b/tests/clients/Makefile.am
@@ -4,7 +4,7 @@ if CAN_TEST
noinst_PROGRAMS = yp ldifsort
yp_SOURCES = yp.c yp_clnt.c
yp_LDADD = @TIRPC_LIBS@ @RPC_LIBS@
-yp_clnt.c: $(includedir)/rpcsvc/yp.x
+yp_clnt.c: @yp_x_include_dir@/rpcsvc/yp.x
$(RPCGEN) -l $< > $@
CLEANFILES = yp_clnt.c
endif