- if $test -f $xxx/$xxx.xs; then
- known_extensions="$known_extensions $1$xxx";
- elif $test -f $xxx/Makefile.PL; then
- nonxs_extensions="$nonxs_extensions $1$xxx";
- else
- if $test -d $xxx -a $# -lt 10; then
- set $1$xxx/ $*;
- cd "$xxx";
- eval $find_extensions;
- cd ..;
- shift;
- fi;
- fi
+ this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`;
+ case "$this_ext" in
+ Scalar/List/Utils) this_ext="List/Util" ;;
+ PathTools) this_ext="Cwd" ;;
+ esac;
+ echo " $xs_extensions $nonxs_extensions" > "$tdir/$$.tmp";
+ if $contains " $this_ext " "$tdir/$$.tmp"; then
+ echo >&4;
+ echo "Duplicate directories detected for extension $xxx" >&4;
+ echo "Configure cannot correctly recover from this - shall I abort?" >&4;
+ case "$knowitall" in
+ "") dflt=y;;
+ *) dflt=n;;
+ esac;
+ . ../UU/myread;
+ case "$ans" in
+ n*|N*) ;;
+ *) echo >&4;
+ echo "Ok. Stopping Configure." >&4;
+ echo "Please remove the duplicate directory (e.g. using git clean) and then re-run Configure" >&4;
+ exit 1;;
+ esac;
+ echo "Ok. You will need to correct config.sh before running make." >&4;
+ fi;
+ $ls -1 "$xxx" > "$tdir/$$.tmp";
+ if $contains "\.xs$" "$tdir/$$.tmp" > /dev/null 2>&1; then
+ xs_extensions="$xs_extensions $this_ext";
+ elif $contains "\.c$" "$tdir/$$.tmp" > /dev/null 2>&1; then
+ xs_extensions="$xs_extensions $this_ext";
+ elif $test -d "$xxx"; then
+ nonxs_extensions="$nonxs_extensions $this_ext";
+ fi;
+ $rm -f "$tdir/$$.tmp";