]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 390] Do not run check-layout if cross-compiling
authorHarlan Stenn <stenn@ntp.org>
Sat, 5 Mar 2005 06:40:18 +0000 (01:40 -0500)
committerHarlan Stenn <stenn@ntp.org>
Sat, 5 Mar 2005 06:40:18 +0000 (01:40 -0500)
bk: 42295452zeGm01-zUF392No43pM70Q

configure.ac
ntpdc/Makefile.am

index e0a457902fac897d0730c857625c46a64764c29e..4bbdf33d0f2ce8b6dd1fa65a3d26521f7c0ab281 100644 (file)
@@ -50,6 +50,39 @@ esac
 
 AMU_OS_CFLAGS
 
+AC_MSG_CHECKING(for bin subdirectory)
+AC_ARG_WITH(binsubdir,
+       AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
+       use_binsubdir="$withval", use_binsubdir="bin")
+
+case "$use_binsubdir" in
+ bin)
+    ;;
+ sbin)
+    ;;
+ *)
+    AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
+    ;;
+esac
+AC_MSG_RESULT($use_binsubdir)
+BINSUBDIR=$use_binsubdir
+AC_SUBST(BINSUBDIR)
+
+if test -d $srcdir/arlib
+then
+    AC_ARG_WITH(arlib,
+       AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
+    [ans=$withval], [ans=no])
+
+    case "$ans" in
+     yes)
+       ARLIB_DIR=arlib
+       AC_CONFIG_SUBDIRS(arlib)
+       ;;
+    esac
+fi
+AC_SUBST(ARLIB_DIR)
+
 AC_ARG_WITH(rpath,
        AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
 [ans=$withval], [ans=x])
@@ -2843,6 +2876,19 @@ case "$ans" in
 esac
 AC_MSG_RESULT($ans)
 
+AC_SUBST(MAKE_CHECK_LAYOUT)
+AC_MSG_CHECKING(if we want to run check-layout)
+case "$cross_compiling$PATH_PERL" in
+ no/*)
+    MAKE_CHECK_LAYOUT=check-layout
+    ans=yes
+    ;;
+ *)
+    ans=no
+    ;;
+esac
+AC_MSG_RESULT($ans)
+
 AC_SUBST(TESTDCF)
 AC_SUBST(DCFD)
 
@@ -3921,39 +3967,6 @@ found_rt_iflist
 
 AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
 
-AC_SUBST(ARLIB_DIR)
-if test -d $srcdir/arlib
-then
-    AC_ARG_WITH(arlib,
-       AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
-    [ans=$withval], [ans=no])
-
-    case "$ans" in
-     yes)
-       ARLIB_DIR=arlib
-       AC_CONFIG_SUBDIRS(arlib)
-       ;;
-    esac
-fi
-
-AC_MSG_CHECKING(for bin subdirectory)
-AC_ARG_WITH(binsubdir,
-       AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
-       use_binsubdir="$withval", use_binsubdir="bin")
-
-case "$use_binsubdir" in
- bin)
-    ;;
- sbin)
-    ;;
- *)
-    AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
-    ;;
-esac
-AC_MSG_RESULT($use_binsubdir)
-BINSUBDIR=$use_binsubdir
-AC_SUBST(BINSUBDIR)
-
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES(ElectricFence/Makefile)
 AC_CONFIG_FILES(adjtimed/Makefile)
index b80502080d81efc2801ed1a63cec1890ef168ed2..c6336a853dabb6d3bcac8001123595daf990ed33 100644 (file)
@@ -4,7 +4,7 @@ bindir=         ${exec_prefix}/${BINSUBDIR}
 bin_PROGRAMS=  ntpdc
 EXTRA_PROGRAMS=        ntpdc-layout
 EXTRA_DATA=    check-layout
-BUILT_SOURCES= maybe-layout
+BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
 AM_CPPFLAGS=   -I$(top_srcdir)/include
 # LDADD might need RESLIB and ADJLIB
 ntpdc_LDADD=   version.o ../libntp/libntp.a @READLINE_LIBS@
@@ -18,11 +18,6 @@ ETAGS_ARGS=  Makefile.am
 
 ntpdc_SOURCES = ntpdc.c ntpdc_ops.c
 
-maybe-layout:
-       @case "${PATH_PERL}" in \
-           /*) ${MAKE} check-layout ;; \
-       esac
-
 ntpdc-layout.o: nl.c
 
 layout.here: ntpdc-layout