Blob Blame History Raw
--- nco-3.1.5/configure.in.ORIG	2006-09-02 16:47:04.000000000 -0400
+++ nco-3.1.5/configure.in	2006-09-02 16:49:23.000000000 -0400
@@ -681,7 +681,11 @@
   elif test "${NETCDF_INC}"; then
     nco_udunits_dat="${NETCDF_INC}/../etc/udunits.dat"
   else
-    nco_udunits_dat="/usr/local/etc/udunits.dat"
+    for udunits_fdat_file in /usr/local/etc/udunits.dat /etc/udunits.dat ; do
+      if test -e "$udunits_fdat_file" ; then
+        nco_udunits_dat="$udunits_fdat_file"
+      fi
+    done
   fi
 # warn if udunits.dat is not found, but continue anyway since the builder may savy and know to add it later, like when building packages (e.g. .debs)
   AC_CHECK_FILE([$nco_udunits_dat],,AC_WARN([file $nco_udunits_dat was not found but will be compiled into NCO. Some executables may fail without it.]))