EXTRA_SCRIPTS =
btrdir = $(prefix)
dist_bin_SCRIPTS = $(BTR_BIN)
-nobase_dist_btr_SCRIPTS = $(BTR_SHARE)
+nobase_dist_btr_SCRIPTS = $(BTR_SCRIPTS)
+nobase_dist_btr_DATA = $(BTR_SHARE)
AC_INIT([btr], [0.4.0], [mike@php.net])
-AC_CONFIG_SRCDIR([./share/btr/btr.sh])
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
-BTR_BIN='$(echo $$abs_srcdir/bin/*)'
-BTR_SHARE='$(echo $$abs_srcdir/share/{*,*/*}/*.*)'
+AC_CONFIG_SRCDIR([./share/btr/btr.sh])
+
+AC_MSG_CHECKING([for bin/ scripts]);
+ BTR_BIN=$(find $srcdir/bin -type f -perm -a=x | xargs)
+AC_MSG_RESULT([$BTR_BIN])
AC_SUBST([BTR_BIN], [$BTR_BIN])
+
+AC_MSG_CHECKING([for share/ scripts])
+ BTR_SCRIPTS=$(find $srcdir/share/btr -type f -perm -a=x | xargs)
+AC_MSG_RESULT([$BTR_SCRIPTS])
+AC_SUBST([BTR_SCRIPTS], [$BTR_SCRIPTS])
+
+AC_MSG_CHECKING([for share/ data])
+ BTR_SHARE=$(find $srcdir/share/btr -type f ! -perm -a=x | xargs)
+AC_MSG_RESULT([$BTR_SHARE])
AC_SUBST([BTR_SHARE], [$BTR_SHARE])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT