• R/O
  • SSH
  • HTTPS

gpx2shp: Commit


Commit MetaInfo

Revision23 (tree)
Zeit2014-01-09 02:05:52
Autorpagong

Log Message

* Fixed build failure with proj4 1.8. (Debian Bug report logs - #733381)

Ändern Zusammenfassung

Diff

--- trunk/gpx2shp/configure (revision 22)
+++ trunk/gpx2shp/configure (revision 23)
@@ -1,6 +1,6 @@
11 #! /bin/sh
22 # Guess values for system-dependent variables and create Makefiles.
3-# Generated by GNU Autoconf 2.69 for gpx2shp 0.70.
3+# Generated by GNU Autoconf 2.69 for gpx2shp 0.71.
44 #
55 # Report bugs to <hiraoka @at@ azukimap.jp>.
66 #
@@ -580,8 +580,8 @@
580580 # Identity of this package.
581581 PACKAGE_NAME='gpx2shp'
582582 PACKAGE_TARNAME='gpx2shp'
583-PACKAGE_VERSION='0.70'
584-PACKAGE_STRING='gpx2shp 0.70'
583+PACKAGE_VERSION='0.71'
584+PACKAGE_STRING='gpx2shp 0.71'
585585 PACKAGE_BUGREPORT='hiraoka @at@ azukimap.jp'
586586 PACKAGE_URL=''
587587
@@ -624,7 +624,9 @@
624624
625625 ac_header_list=
626626 ac_func_list=
627-ac_subst_vars='LTLIBOBJS
627+ac_subst_vars='am__EXEEXT_FALSE
628+am__EXEEXT_TRUE
629+LTLIBOBJS
628630 LIBOBJS
629631 EGREP
630632 GREP
@@ -632,6 +634,7 @@
632634 am__fastdepCC_FALSE
633635 am__fastdepCC_TRUE
634636 CCDEPMODE
637+am__nodep
635638 AMDEPBACKSLASH
636639 AMDEP_FALSE
637640 AMDEP_TRUE
@@ -652,6 +655,7 @@
652655 SET_MAKE
653656 AWK
654657 mkdir_p
658+MKDIR_P
655659 INSTALL_STRIP_PROGRAM
656660 STRIP
657661 install_sh
@@ -663,6 +667,7 @@
663667 VERSION
664668 PACKAGE
665669 CYGPATH_W
670+am__isrc
666671 INSTALL_DATA
667672 INSTALL_SCRIPT
668673 INSTALL_PROGRAM
@@ -1259,7 +1264,7 @@
12591264 # Omit some internal or obsolete options to make the list less imposing.
12601265 # This message is too long to be a string in the A/UX 3.1 sh.
12611266 cat <<_ACEOF
1262-\`configure' configures gpx2shp 0.70 to adapt to many kinds of systems.
1267+\`configure' configures gpx2shp 0.71 to adapt to many kinds of systems.
12631268
12641269 Usage: $0 [OPTION]... [VAR=VALUE]...
12651270
@@ -1325,7 +1330,7 @@
13251330
13261331 if test -n "$ac_init_help"; then
13271332 case $ac_init_help in
1328- short | recursive ) echo "Configuration of gpx2shp 0.70:";;
1333+ short | recursive ) echo "Configuration of gpx2shp 0.71:";;
13291334 esac
13301335 cat <<\_ACEOF
13311336
@@ -1413,7 +1418,7 @@
14131418 test -n "$ac_init_help" && exit $ac_status
14141419 if $ac_init_version; then
14151420 cat <<\_ACEOF
1416-gpx2shp configure 0.70
1421+gpx2shp configure 0.71
14171422 generated by GNU Autoconf 2.69
14181423
14191424 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1782,7 +1787,7 @@
17821787 This file contains any messages produced by compilers while
17831788 running configure, to aid debugging if configure makes a mistake.
17841789
1785-It was created by gpx2shp $as_me 0.70, which was
1790+It was created by gpx2shp $as_me 0.71, which was
17861791 generated by GNU Autoconf 2.69. Invocation command line was
17871792
17881793 $ $0 $@
@@ -2133,7 +2138,8 @@
21332138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21342139
21352140
2136-am__api_version="1.9"
2141+am__api_version='1.11'
2142+
21372143 ac_aux_dir=
21382144 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
21392145 if test -f "$ac_dir/install-sh"; then
@@ -2261,6 +2267,19 @@
22612267 # Just in case
22622268 sleep 1
22632269 echo timestamp > conftest.file
2270+# Reject unsafe characters in $srcdir or the absolute working directory
2271+# name. Accept space and tab only in the latter.
2272+am_lf='
2273+'
2274+case `pwd` in
2275+ *[\\\"\#\$\&\'\`$am_lf]*)
2276+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2277+esac
2278+case $srcdir in
2279+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2280+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2281+esac
2282+
22642283 # Do `set' in a subshell so we don't clobber the current shell's
22652284 # arguments. Must try -L first in case configure is actually a
22662285 # symlink; some systems play weird games with the mod time of symlinks
@@ -2267,10 +2286,10 @@
22672286 # (eg FreeBSD returns the mod time of the symlink's containing
22682287 # directory).
22692288 if (
2270- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2289+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
22712290 if test "$*" = "X"; then
22722291 # -L didn't work.
2273- set X `ls -t $srcdir/configure conftest.file`
2292+ set X `ls -t "$srcdir/configure" conftest.file`
22742293 fi
22752294 rm -f conftest.file
22762295 if test "$*" != "X $srcdir/configure conftest.file" \
@@ -2308,7 +2327,14 @@
23082327 # expand $ac_aux_dir to an absolute path
23092328 am_aux_dir=`cd $ac_aux_dir && pwd`
23102329
2311-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2330+if test x"${MISSING+set}" != xset; then
2331+ case $am_aux_dir in
2332+ *\ * | *\ *)
2333+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2334+ *)
2335+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
2336+ esac
2337+fi
23122338 # Use eval to expand $SHELL
23132339 if eval "$MISSING --run true"; then
23142340 am_missing_run="$MISSING --run "
@@ -2318,39 +2344,163 @@
23182344 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
23192345 fi
23202346
2321-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
2322- # We used to keeping the `.' as first argument, in order to
2323- # allow $(mkdir_p) to be used without argument. As in
2324- # $(mkdir_p) $(somedir)
2325- # where $(somedir) is conditionally defined. However this is wrong
2326- # for two reasons:
2327- # 1. if the package is installed by a user who cannot write `.'
2328- # make install will fail,
2329- # 2. the above comment should most certainly read
2330- # $(mkdir_p) $(DESTDIR)$(somedir)
2331- # so it does not work when $(somedir) is undefined and
2332- # $(DESTDIR) is not.
2333- # To support the latter case, we have to write
2334- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
2335- # so the `.' trick is pointless.
2336- mkdir_p='mkdir -p --'
2347+if test x"${install_sh}" != xset; then
2348+ case $am_aux_dir in
2349+ *\ * | *\ *)
2350+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2351+ *)
2352+ install_sh="\${SHELL} $am_aux_dir/install-sh"
2353+ esac
2354+fi
2355+
2356+# Installed binaries are usually stripped using `strip' when the user
2357+# run `make install-strip'. However `strip' might not be the right
2358+# tool to use in cross-compilation environments, therefore Automake
2359+# will honor the `STRIP' environment variable to overrule this program.
2360+if test "$cross_compiling" != no; then
2361+ if test -n "$ac_tool_prefix"; then
2362+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2363+set dummy ${ac_tool_prefix}strip; ac_word=$2
2364+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2365+$as_echo_n "checking for $ac_word... " >&6; }
2366+if ${ac_cv_prog_STRIP+:} false; then :
2367+ $as_echo_n "(cached) " >&6
23372368 else
2338- # On NextStep and OpenStep, the `mkdir' command does not
2339- # recognize any option. It will interpret all options as
2340- # directories to create, and then abort because `.' already
2341- # exists.
2342- for d in ./-p ./--version;
2343- do
2344- test -d $d && rmdir $d
2369+ if test -n "$STRIP"; then
2370+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2371+else
2372+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373+for as_dir in $PATH
2374+do
2375+ IFS=$as_save_IFS
2376+ test -z "$as_dir" && as_dir=.
2377+ for ac_exec_ext in '' $ac_executable_extensions; do
2378+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2379+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2380+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2381+ break 2
2382+ fi
2383+done
23452384 done
2346- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
2347- if test -f "$ac_aux_dir/mkinstalldirs"; then
2348- mkdir_p='$(mkinstalldirs)'
2385+IFS=$as_save_IFS
2386+
2387+fi
2388+fi
2389+STRIP=$ac_cv_prog_STRIP
2390+if test -n "$STRIP"; then
2391+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2392+$as_echo "$STRIP" >&6; }
2393+else
2394+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2395+$as_echo "no" >&6; }
2396+fi
2397+
2398+
2399+fi
2400+if test -z "$ac_cv_prog_STRIP"; then
2401+ ac_ct_STRIP=$STRIP
2402+ # Extract the first word of "strip", so it can be a program name with args.
2403+set dummy strip; ac_word=$2
2404+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2405+$as_echo_n "checking for $ac_word... " >&6; }
2406+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2407+ $as_echo_n "(cached) " >&6
2408+else
2409+ if test -n "$ac_ct_STRIP"; then
2410+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2411+else
2412+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2413+for as_dir in $PATH
2414+do
2415+ IFS=$as_save_IFS
2416+ test -z "$as_dir" && as_dir=.
2417+ for ac_exec_ext in '' $ac_executable_extensions; do
2418+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2419+ ac_cv_prog_ac_ct_STRIP="strip"
2420+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2421+ break 2
2422+ fi
2423+done
2424+ done
2425+IFS=$as_save_IFS
2426+
2427+fi
2428+fi
2429+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2430+if test -n "$ac_ct_STRIP"; then
2431+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2432+$as_echo "$ac_ct_STRIP" >&6; }
2433+else
2434+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2435+$as_echo "no" >&6; }
2436+fi
2437+
2438+ if test "x$ac_ct_STRIP" = x; then
2439+ STRIP=":"
23492440 else
2350- mkdir_p='$(install_sh) -d'
2441+ case $cross_compiling:$ac_tool_warned in
2442+yes:)
2443+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2444+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2445+ac_tool_warned=yes ;;
2446+esac
2447+ STRIP=$ac_ct_STRIP
23512448 fi
2449+else
2450+ STRIP="$ac_cv_prog_STRIP"
23522451 fi
23532452
2453+fi
2454+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2455+
2456+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2457+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2458+if test -z "$MKDIR_P"; then
2459+ if ${ac_cv_path_mkdir+:} false; then :
2460+ $as_echo_n "(cached) " >&6
2461+else
2462+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2463+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2464+do
2465+ IFS=$as_save_IFS
2466+ test -z "$as_dir" && as_dir=.
2467+ for ac_prog in mkdir gmkdir; do
2468+ for ac_exec_ext in '' $ac_executable_extensions; do
2469+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2470+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2471+ 'mkdir (GNU coreutils) '* | \
2472+ 'mkdir (coreutils) '* | \
2473+ 'mkdir (fileutils) '4.1*)
2474+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2475+ break 3;;
2476+ esac
2477+ done
2478+ done
2479+ done
2480+IFS=$as_save_IFS
2481+
2482+fi
2483+
2484+ test -d ./--version && rmdir ./--version
2485+ if test "${ac_cv_path_mkdir+set}" = set; then
2486+ MKDIR_P="$ac_cv_path_mkdir -p"
2487+ else
2488+ # As a last resort, use the slow shell script. Don't cache a
2489+ # value for MKDIR_P within a source directory, because that will
2490+ # break other packages using the cache if that directory is
2491+ # removed, or if the value is a relative name.
2492+ MKDIR_P="$ac_install_sh -d"
2493+ fi
2494+fi
2495+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2496+$as_echo "$MKDIR_P" >&6; }
2497+
2498+mkdir_p="$MKDIR_P"
2499+case $mkdir_p in
2500+ [\\/$]* | ?:[\\/]*) ;;
2501+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2502+esac
2503+
23542504 for ac_prog in gawk mawk nawk awk
23552505 do
23562506 # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -2433,10 +2583,14 @@
24332583 fi
24342584 rmdir .tst 2>/dev/null
24352585
2436-# test to see if srcdir already configured
2437-if test "`cd $srcdir && pwd`" != "`pwd`" &&
2438- test -f $srcdir/config.status; then
2439- as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2586+if test "`cd $srcdir && pwd`" != "`pwd`"; then
2587+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2588+ # is not polluted with repeated "-I."
2589+ am__isrc=' -I$(srcdir)'
2590+ # test to see if srcdir already configured
2591+ if test -f $srcdir/config.status; then
2592+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2593+ fi
24402594 fi
24412595
24422596 # test whether we have cygpath
@@ -2451,7 +2605,7 @@
24512605
24522606 # Define the identity of the package.
24532607 PACKAGE=gpx2shp
2454- VERSION=0.70
2608+ VERSION=0.71
24552609
24562610
24572611 cat >>confdefs.h <<_ACEOF
@@ -2479,121 +2633,19 @@
24792633
24802634 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
24812635
2482-install_sh=${install_sh-"$am_aux_dir/install-sh"}
2483-
2484-# Installed binaries are usually stripped using `strip' when the user
2485-# run `make install-strip'. However `strip' might not be the right
2486-# tool to use in cross-compilation environments, therefore Automake
2487-# will honor the `STRIP' environment variable to overrule this program.
2488-if test "$cross_compiling" != no; then
2489- if test -n "$ac_tool_prefix"; then
2490- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2491-set dummy ${ac_tool_prefix}strip; ac_word=$2
2492-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2493-$as_echo_n "checking for $ac_word... " >&6; }
2494-if ${ac_cv_prog_STRIP+:} false; then :
2495- $as_echo_n "(cached) " >&6
2496-else
2497- if test -n "$STRIP"; then
2498- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2499-else
2500-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2501-for as_dir in $PATH
2502-do
2503- IFS=$as_save_IFS
2504- test -z "$as_dir" && as_dir=.
2505- for ac_exec_ext in '' $ac_executable_extensions; do
2506- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2507- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2508- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2509- break 2
2510- fi
2511-done
2512- done
2513-IFS=$as_save_IFS
2514-
2515-fi
2516-fi
2517-STRIP=$ac_cv_prog_STRIP
2518-if test -n "$STRIP"; then
2519- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2520-$as_echo "$STRIP" >&6; }
2521-else
2522- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2523-$as_echo "no" >&6; }
2524-fi
2525-
2526-
2527-fi
2528-if test -z "$ac_cv_prog_STRIP"; then
2529- ac_ct_STRIP=$STRIP
2530- # Extract the first word of "strip", so it can be a program name with args.
2531-set dummy strip; ac_word=$2
2532-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2533-$as_echo_n "checking for $ac_word... " >&6; }
2534-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2535- $as_echo_n "(cached) " >&6
2536-else
2537- if test -n "$ac_ct_STRIP"; then
2538- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2539-else
2540-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541-for as_dir in $PATH
2542-do
2543- IFS=$as_save_IFS
2544- test -z "$as_dir" && as_dir=.
2545- for ac_exec_ext in '' $ac_executable_extensions; do
2546- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2547- ac_cv_prog_ac_ct_STRIP="strip"
2548- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2549- break 2
2550- fi
2551-done
2552- done
2553-IFS=$as_save_IFS
2554-
2555-fi
2556-fi
2557-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2558-if test -n "$ac_ct_STRIP"; then
2559- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2560-$as_echo "$ac_ct_STRIP" >&6; }
2561-else
2562- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2563-$as_echo "no" >&6; }
2564-fi
2565-
2566- if test "x$ac_ct_STRIP" = x; then
2567- STRIP=":"
2568- else
2569- case $cross_compiling:$ac_tool_warned in
2570-yes:)
2571-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2572-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2573-ac_tool_warned=yes ;;
2574-esac
2575- STRIP=$ac_ct_STRIP
2576- fi
2577-else
2578- STRIP="$ac_cv_prog_STRIP"
2579-fi
2580-
2581-fi
2582-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2583-
25842636 # We need awk for the "check" target. The system "awk" is bad on
25852637 # some platforms.
2586-# Always define AMTAR for backward compatibility.
2638+# Always define AMTAR for backward compatibility. Yes, it's still used
2639+# in the wild :-( We should find a proper way to deprecate it ...
2640+AMTAR='$${TAR-tar}'
25872641
2588-AMTAR=${AMTAR-"${am_missing_run}tar"}
2642+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
25892643
2590-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
25912644
25922645
25932646
25942647
25952648
2596-
25972649 ac_config_headers="$ac_config_headers src/config.h"
25982650
25992651
@@ -3394,7 +3446,7 @@
33943446 am_make=${MAKE-make}
33953447 cat > confinc << 'END'
33963448 am__doit:
3397- @echo done
3449+ @echo this is the am__doit target
33983450 .PHONY: am__doit
33993451 END
34003452 # If we don't find an include directive, just comment out the code.
@@ -3405,24 +3457,24 @@
34053457 _am_result=none
34063458 # First try GNU make style include.
34073459 echo "include confinc" > confmf
3408-# We grep out `Entering directory' and `Leaving directory'
3409-# messages which can occur if `w' ends up in MAKEFLAGS.
3410-# In particular we don't look at `^make:' because GNU make might
3411-# be invoked under some other name (usually "gmake"), in which
3412-# case it prints its new name instead of `make'.
3413-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
3414- am__include=include
3415- am__quote=
3416- _am_result=GNU
3417-fi
3460+# Ignore all kinds of additional output from `make'.
3461+case `$am_make -s -f confmf 2> /dev/null` in #(
3462+*the\ am__doit\ target*)
3463+ am__include=include
3464+ am__quote=
3465+ _am_result=GNU
3466+ ;;
3467+esac
34183468 # Now try BSD make style include.
34193469 if test "$am__include" = "#"; then
34203470 echo '.include "confinc"' > confmf
3421- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
3422- am__include=.include
3423- am__quote="\""
3424- _am_result=BSD
3425- fi
3471+ case `$am_make -s -f confmf 2> /dev/null` in #(
3472+ *the\ am__doit\ target*)
3473+ am__include=.include
3474+ am__quote="\""
3475+ _am_result=BSD
3476+ ;;
3477+ esac
34263478 fi
34273479
34283480
@@ -3438,10 +3490,9 @@
34383490 if test "x$enable_dependency_tracking" != xno; then
34393491 am_depcomp="$ac_aux_dir/depcomp"
34403492 AMDEPBACKSLASH='\'
3493+ am__nodep='_no'
34413494 fi
3442-
3443-
3444-if test "x$enable_dependency_tracking" != xno; then
3495+ if test "x$enable_dependency_tracking" != xno; then
34453496 AMDEP_TRUE=
34463497 AMDEP_FALSE='#'
34473498 else
@@ -3451,7 +3502,6 @@
34513502
34523503
34533504
3454-
34553505 depcc="$CC" am_compiler_list=
34563506
34573507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -3465,6 +3515,7 @@
34653515 # instance it was reported that on HP-UX the gcc test will end up
34663516 # making a dummy file named `D' -- because `-MD' means `put the output
34673517 # in D'.
3518+ rm -rf conftest.dir
34683519 mkdir conftest.dir
34693520 # Copy depcomp to subdir because otherwise we won't find it if we're
34703521 # using a relative directory.
@@ -3482,6 +3533,11 @@
34823533 if test "$am_compiler_list" = ""; then
34833534 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
34843535 fi
3536+ am__universal=false
3537+ case " $depcc " in #(
3538+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
3539+ esac
3540+
34853541 for depmode in $am_compiler_list; do
34863542 # Setup a source with many dependencies, because some compilers
34873543 # like to wrap large dependency lists on column 80 (with \), and
@@ -3499,7 +3555,17 @@
34993555 done
35003556 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
35013557
3558+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
3559+ # mode. It turns out that the SunPro C++ compiler does not properly
3560+ # handle `-M -o', and we need to detect this. Also, some Intel
3561+ # versions had trouble with output in subdirs
3562+ am__obj=sub/conftest.${OBJEXT-o}
3563+ am__minus_obj="-o $am__obj"
35023564 case $depmode in
3565+ gcc)
3566+ # This depmode causes a compiler race in universal mode.
3567+ test "$am__universal" = false || continue
3568+ ;;
35033569 nosideeffect)
35043570 # after this tag, mechanisms are not by side-effect, so they'll
35053571 # only be used when explicitly requested
@@ -3509,18 +3575,23 @@
35093575 break
35103576 fi
35113577 ;;
3578+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3579+ # This compiler won't grok `-c -o', but also, the minuso test has
3580+ # not run yet. These depmodes are late enough in the game, and
3581+ # so weak that their functioning should not be impacted.
3582+ am__obj=conftest.${OBJEXT-o}
3583+ am__minus_obj=
3584+ ;;
35123585 none) break ;;
35133586 esac
3514- # We check with `-c' and `-o' for the sake of the "dashmstdout"
3515- # mode. It turns out that the SunPro C++ compiler does not properly
3516- # handle `-M -o', and we need to detect this.
35173587 if depmode=$depmode \
3518- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3588+ source=sub/conftest.c object=$am__obj \
35193589 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3520- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
3590+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
35213591 >/dev/null 2>conftest.err &&
3592+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
35223593 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3523- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
3594+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
35243595 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
35253596 # icc doesn't choke on unknown options, it will just issue warnings
35263597 # or remarks (even with -Werror). So we grep stderr for any message
@@ -3548,9 +3619,7 @@
35483619 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
35493620 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
35503621
3551-
3552-
3553-if
3622+ if
35543623 test "x$enable_dependency_tracking" != xno \
35553624 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
35563625 am__fastdepCC_TRUE=
@@ -3652,6 +3721,8 @@
36523721
36533722 LIBS="-lproj $LIBS"
36543723
3724+else
3725+ as_fn_error $? "\"proj is not available.\"" "$LINENO" 5
36553726 fi
36563727
36573728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_SetUserData in -lexpat" >&5
@@ -3697,6 +3768,8 @@
36973768
36983769 LIBS="-lexpat $LIBS"
36993770
3771+else
3772+ as_fn_error $? "\"expat is not available.\"" "$LINENO" 5
37003773 fi
37013774
37023775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
@@ -3742,9 +3815,59 @@
37423815
37433816 LIBS="-lm $LIBS"
37443817
3818+else
3819+ as_fn_error $? "\"m is not available.\"" "$LINENO" 5
37453820 fi
37463821
37473822
3823+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_get_spheroid_defn in -lproj" >&5
3824+$as_echo_n "checking for pj_get_spheroid_defn in -lproj... " >&6; }
3825+if ${ac_cv_lib_proj_pj_get_spheroid_defn+:} false; then :
3826+ $as_echo_n "(cached) " >&6
3827+else
3828+ ac_check_lib_save_LIBS=$LIBS
3829+LIBS="-lproj $LIBS"
3830+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3831+/* end confdefs.h. */
3832+
3833+/* Override any GCC internal prototype to avoid an error.
3834+ Use char because int might match the return type of a GCC
3835+ builtin and then its argument prototype would still apply. */
3836+#ifdef __cplusplus
3837+extern "C"
3838+#endif
3839+char pj_get_spheroid_defn ();
3840+int
3841+main ()
3842+{
3843+return pj_get_spheroid_defn ();
3844+ ;
3845+ return 0;
3846+}
3847+_ACEOF
3848+if ac_fn_c_try_link "$LINENO"; then :
3849+ ac_cv_lib_proj_pj_get_spheroid_defn=yes
3850+else
3851+ ac_cv_lib_proj_pj_get_spheroid_defn=no
3852+fi
3853+rm -f core conftest.err conftest.$ac_objext \
3854+ conftest$ac_exeext conftest.$ac_ext
3855+LIBS=$ac_check_lib_save_LIBS
3856+fi
3857+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_get_spheroid_defn" >&5
3858+$as_echo "$ac_cv_lib_proj_pj_get_spheroid_defn" >&6; }
3859+if test "x$ac_cv_lib_proj_pj_get_spheroid_defn" = xyes; then :
3860+
3861+$as_echo "#define IS_PROJ_NEW /**/" >>confdefs.h
3862+
3863+else
3864+
3865+$as_echo "#define IS_PROJ_OLD /**/" >>confdefs.h
3866+
3867+
3868+fi
3869+
3870+
37483871 # Checks for header files.
37493872 ac_ext=c
37503873 ac_cpp='$CPP $CPPFLAGS'
@@ -4126,37 +4249,7 @@
41264249
41274250 fi
41284251
4129-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4130-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4131- inttypes.h stdint.h unistd.h
4132-do :
4133- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4134-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4135-"
4136-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4137- cat >>confdefs.h <<_ACEOF
4138-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4139-_ACEOF
41404252
4141-fi
4142-
4143-done
4144-
4145-
4146-for ac_header in limits.h stdlib.h string.h unistd.h
4147-do :
4148- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4149-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4150-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4151- cat >>confdefs.h <<_ACEOF
4152-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4153-_ACEOF
4154-
4155-fi
4156-
4157-done
4158-
4159-
41604253 # Checks for typedefs, structures, and compiler characteristics.
41614254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
41624255 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
@@ -4276,6 +4369,23 @@
42764369
42774370
42784371 # Checks for library functions.
4372+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4373+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4374+ inttypes.h stdint.h unistd.h
4375+do :
4376+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4377+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4378+"
4379+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4380+ cat >>confdefs.h <<_ACEOF
4381+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4382+_ACEOF
4383+
4384+fi
4385+
4386+done
4387+
4388+
42794389 for ac_header in stdlib.h
42804390 do :
42814391 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
@@ -4832,6 +4942,14 @@
48324942 LTLIBOBJS=$ac_ltlibobjs
48334943
48344944
4945+ if test -n "$EXEEXT"; then
4946+ am__EXEEXT_TRUE=
4947+ am__EXEEXT_FALSE='#'
4948+else
4949+ am__EXEEXT_TRUE='#'
4950+ am__EXEEXT_FALSE=
4951+fi
4952+
48354953 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
48364954 as_fn_error $? "conditional \"AMDEP\" was never defined.
48374955 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -5237,7 +5355,7 @@
52375355 # report actual input values of CONFIG_FILES etc. instead of their
52385356 # values after options handling.
52395357 ac_log="
5240-This file was extended by gpx2shp $as_me 0.70, which was
5358+This file was extended by gpx2shp $as_me 0.71, which was
52415359 generated by GNU Autoconf 2.69. Invocation command line was
52425360
52435361 CONFIG_FILES = $CONFIG_FILES
@@ -5303,7 +5421,7 @@
53035421 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53045422 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53055423 ac_cs_version="\\
5306-gpx2shp config.status 0.70
5424+gpx2shp config.status 0.71
53075425 configured by $0, generated by GNU Autoconf 2.69,
53085426 with options \\"\$ac_cs_config\\"
53095427
@@ -5314,6 +5432,7 @@
53145432 ac_pwd='$ac_pwd'
53155433 srcdir='$srcdir'
53165434 INSTALL='$INSTALL'
5435+MKDIR_P='$MKDIR_P'
53175436 AWK='$AWK'
53185437 test -n "\$AWK" || AWK=awk
53195438 _ACEOF
@@ -5884,6 +6003,11 @@
58846003 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
58856004 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
58866005 esac
6006+ ac_MKDIR_P=$MKDIR_P
6007+ case $MKDIR_P in
6008+ [\\/$]* | ?:[\\/]* ) ;;
6009+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
6010+ esac
58876011 _ACEOF
58886012
58896013 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -5938,6 +6062,7 @@
59386062 s&@abs_builddir@&$ac_abs_builddir&;t t
59396063 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
59406064 s&@INSTALL@&$ac_INSTALL&;t t
6065+s&@MKDIR_P@&$ac_MKDIR_P&;t t
59416066 $ac_datarootdir_hack
59426067 "
59436068 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
@@ -5983,21 +6108,22 @@
59836108 || as_fn_error $? "could not create -" "$LINENO" 5
59846109 fi
59856110 # Compute "$ac_file"'s index in $config_headers.
6111+_am_arg="$ac_file"
59866112 _am_stamp_count=1
59876113 for _am_header in $config_headers :; do
59886114 case $_am_header in
5989- "$ac_file" | "$ac_file":* )
6115+ $_am_arg | $_am_arg:* )
59906116 break ;;
59916117 * )
59926118 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
59936119 esac
59946120 done
5995-echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
5996-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5997- X"$ac_file" : 'X\(//\)[^/]' \| \
5998- X"$ac_file" : 'X\(//\)$' \| \
5999- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
6000-$as_echo X"$ac_file" |
6121+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
6122+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6123+ X"$_am_arg" : 'X\(//\)[^/]' \| \
6124+ X"$_am_arg" : 'X\(//\)$' \| \
6125+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
6126+$as_echo X"$_am_arg" |
60016127 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60026128 s//\1/
60036129 q
@@ -6024,17 +6150,28 @@
60246150
60256151
60266152 case $ac_file$ac_mode in
6027- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
6028- # Strip MF so we end up with the name of the file.
6029- mf=`echo "$mf" | sed -e 's/:.*$//'`
6030- # Check whether this is an Automake generated Makefile or not.
6031- # We used to match only the files named `Makefile.in', but
6032- # some people rename them; so instead we look at the file content.
6033- # Grep'ing the first line is not enough: some people post-process
6034- # each Makefile.in and add a new line on top of each file to say so.
6035- # So let's grep whole file.
6036- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6037- dirpart=`$as_dirname -- "$mf" ||
6153+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
6154+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
6155+ # are listed without --file. Let's play safe and only enable the eval
6156+ # if we detect the quoting.
6157+ case $CONFIG_FILES in
6158+ *\'*) eval set x "$CONFIG_FILES" ;;
6159+ *) set x $CONFIG_FILES ;;
6160+ esac
6161+ shift
6162+ for mf
6163+ do
6164+ # Strip MF so we end up with the name of the file.
6165+ mf=`echo "$mf" | sed -e 's/:.*$//'`
6166+ # Check whether this is an Automake generated Makefile or not.
6167+ # We used to match only the files named `Makefile.in', but
6168+ # some people rename them; so instead we look at the file content.
6169+ # Grep'ing the first line is not enough: some people post-process
6170+ # each Makefile.in and add a new line on top of each file to say so.
6171+ # Grep'ing the whole file is not good either: AIX grep has a line
6172+ # limit of 2048, but all sed's we know have understand at least 4000.
6173+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
6174+ dirpart=`$as_dirname -- "$mf" ||
60386175 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60396176 X"$mf" : 'X\(//\)[^/]' \| \
60406177 X"$mf" : 'X\(//\)$' \| \
@@ -6057,28 +6194,28 @@
60576194 q
60586195 }
60596196 s/.*/./; q'`
6060- else
6061- continue
6062- fi
6063- # Extract the definition of DEPDIR, am__include, and am__quote
6064- # from the Makefile without running `make'.
6065- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6066- test -z "$DEPDIR" && continue
6067- am__include=`sed -n 's/^am__include = //p' < "$mf"`
6068- test -z "am__include" && continue
6069- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6070- # When using ansi2knr, U may be empty or an underscore; expand it
6071- U=`sed -n 's/^U = //p' < "$mf"`
6072- # Find all dependency output files, they are included files with
6073- # $(DEPDIR) in their names. We invoke sed twice because it is the
6074- # simplest approach to changing $(DEPDIR) to its actual value in the
6075- # expansion.
6076- for file in `sed -n "
6077- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6078- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6079- # Make sure the directory exists.
6080- test -f "$dirpart/$file" && continue
6081- fdir=`$as_dirname -- "$file" ||
6197+ else
6198+ continue
6199+ fi
6200+ # Extract the definition of DEPDIR, am__include, and am__quote
6201+ # from the Makefile without running `make'.
6202+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6203+ test -z "$DEPDIR" && continue
6204+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
6205+ test -z "am__include" && continue
6206+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6207+ # When using ansi2knr, U may be empty or an underscore; expand it
6208+ U=`sed -n 's/^U = //p' < "$mf"`
6209+ # Find all dependency output files, they are included files with
6210+ # $(DEPDIR) in their names. We invoke sed twice because it is the
6211+ # simplest approach to changing $(DEPDIR) to its actual value in the
6212+ # expansion.
6213+ for file in `sed -n "
6214+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6215+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6216+ # Make sure the directory exists.
6217+ test -f "$dirpart/$file" && continue
6218+ fdir=`$as_dirname -- "$file" ||
60826219 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60836220 X"$file" : 'X\(//\)[^/]' \| \
60846221 X"$file" : 'X\(//\)$' \| \
@@ -6101,11 +6238,12 @@
61016238 q
61026239 }
61036240 s/.*/./; q'`
6104- as_dir=$dirpart/$fdir; as_fn_mkdir_p
6105- # echo "creating $dirpart/$file"
6106- echo '# dummy' > "$dirpart/$file"
6241+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
6242+ # echo "creating $dirpart/$file"
6243+ echo '# dummy' > "$dirpart/$file"
6244+ done
61076245 done
6108-done
6246+}
61096247 ;;
61106248
61116249 esac
--- trunk/gpx2shp/src/config.h.in (revision 22)
+++ trunk/gpx2shp/src/config.h.in (revision 23)
@@ -15,9 +15,6 @@
1515 /* Define to 1 if you have the `proj' library (-lproj). */
1616 #undef HAVE_LIBPROJ
1717
18-/* Define to 1 if you have the <limits.h> header file. */
19-#undef HAVE_LIMITS_H
20-
2118 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
2219 to 0 otherwise. */
2320 #undef HAVE_MALLOC
@@ -59,6 +56,12 @@
5956 /* Define to 1 if you have the <unistd.h> header file. */
6057 #undef HAVE_UNISTD_H
6158
59+/* proj4 version is 1.8 or later */
60+#undef IS_PROJ_NEW
61+
62+/* proj4 version is lower than 1.7 */
63+#undef IS_PROJ_OLD
64+
6265 /* Name of package */
6366 #undef PACKAGE
6467
--- trunk/gpx2shp/src/geod_set.c (revision 22)
+++ trunk/gpx2shp/src/geod_set.c (revision 23)
@@ -1,8 +1,12 @@
1-#ifndef lint
1+#include "config.h"
2+
23 /*
4+ * PROJ4 <= 1.7
5+ */
6+#ifdef IS_PROJ_OLD
7+/*
38 * static const char SCCSID[]="@(#)geod_set.c 4.8 95/09/23 GIE REL";
49 */
5-#endif
610
711 #define _IN_GEOD_SET
812
@@ -20,17 +24,17 @@
2024 * put arguments into internal linked list
2125 */
2226 if (argc <= 0)
23- emess(1, "no arguments in initialization list");
27+ emess(1, "no arguments in initialization list");
2428 for (i = 0; i < argc; ++i)
25- if (i)
26- curr = curr->next = pj_mkparam(argv[i]);
27- else
28- start = curr = pj_mkparam(argv[i]);
29+ if (i)
30+ curr = curr->next = pj_mkparam(argv[i]);
31+ else
32+ start = curr = pj_mkparam(argv[i]);
2933 /*
3034 * set elliptical parameters
3135 */
3236 if (pj_ell_set(start, &geod_a, &es))
33- emess(1, "ellipse setup failure");
37+ emess(1, "ellipse setup failure");
3438 /*
3539 * set units
3640 */
@@ -38,12 +42,12 @@
3842 char *s;
3943
4044 for (i = 0; (s = pj_units[i].id) && strcmp(name, s); ++i)
41- ;
45+ ;
4246 if (!s)
43- emess(1, "%s unknown unit conversion id", name);
47+ emess(1, "%s unknown unit conversion id", name);
4448 fr_meter = 1. / (to_meter = atof(pj_units[i].to_meter));
4549 } else
46- to_meter = fr_meter = 1.;
50+ to_meter = fr_meter = 1.;
4751 if ((ellipse = es != 0.)) { /* added parentheses */
4852 onef = sqrt(1. - es);
4953 geod_f = 1 - onef;
@@ -74,16 +78,16 @@
7478 geod_pre();
7579 geod_for();
7680 } else
77- emess(1, "incomplete geodesic/arc info");
81+ emess(1, "incomplete geodesic/arc info");
7882 if ((n_alpha = pj_param(start, "in_A").i) > 0) {
7983 if (!(del_alpha = pj_param(start, "rdel_A").f))
80- emess(1, "del azimuth == 0");
84+ emess(1, "del azimuth == 0");
8185 } else if ((del_S = fabs(pj_param(start, "ddel_S").f))) { /* added
8286 * parentheses
8387 */
8488 n_S = geod_S / del_S + .5;
8589 } else if ((n_S = pj_param(start, "in_S").i) <= 0)
86- emess(1, "no interval divisor selected");
90+ emess(1, "no interval divisor selected");
8791 }
8892 /*
8993 * free up linked list
@@ -93,3 +97,86 @@
9397 pj_dalloc(start);
9498 }
9599 }
100+#endif
101+
102+/*
103+ * PROJ4 >= 1.8
104+ */
105+#ifdef IS_PROJ_NEW
106+
107+#define _IN_GEOD_SET
108+
109+#include <string.h>
110+#include "projects.h"
111+#include "geodesic.h"
112+#include "emess.h"
113+void
114+geod_set(int argc, char **argv) {
115+ paralist *start = 0, *curr;
116+ double es;
117+ char *name;
118+ int i;
119+
120+ /* put arguments into internal linked list */
121+ if (argc <= 0)
122+ emess(1, "no arguments in initialization list");
123+ for (i = 0; i < argc; ++i)
124+ if (i)
125+ curr = curr->next = pj_mkparam(argv[i]);
126+ else
127+ start = curr = pj_mkparam(argv[i]);
128+ /* set elliptical parameters */
129+ if (pj_ell_set(pj_get_default_ctx(),start, &geod_a, &es)) emess(1,"ellipse setup failure");
130+ /* set units */
131+ if ((name = pj_param(NULL,start, "sunits").s) != NULL) {
132+ char *s;
133+ struct PJ_UNITS *unit_list = pj_get_units_ref();
134+ for (i = 0; (s = unit_list[i].id) && strcmp(name, s); ++i);
135+ if (!s)
136+ emess(1,"%s unknown unit conversion id", name);
137+ fr_meter = 1. / (to_meter = atof(unit_list[i].to_meter));
138+ } else
139+ to_meter = fr_meter = 1.;
140+ if ((ellipse = es) != 0.) {
141+ onef = sqrt(1. - es);
142+ geod_f = 1 - onef;
143+ f2 = geod_f/2;
144+ f4 = geod_f/4;
145+ f64 = geod_f*geod_f/64;
146+ } else {
147+ onef = 1.;
148+ geod_f = f2 = f4 = f64 = 0.;
149+ }
150+ /* check if line or arc mode */
151+ if (pj_param(NULL,start, "tlat_1").i) {
152+ double del_S;
153+#undef f
154+ phi1 = pj_param(NULL,start, "rlat_1").f;
155+ lam1 = pj_param(NULL,start, "rlon_1").f;
156+ if (pj_param(NULL,start, "tlat_2").i) {
157+ phi2 = pj_param(NULL,start, "rlat_2").f;
158+ lam2 = pj_param(NULL,start, "rlon_2").f;
159+ geod_inv();
160+ geod_pre();
161+ } else if ((geod_S = pj_param(NULL,start, "dS").f) != 0.) {
162+ al12 = pj_param(NULL,start, "rA").f;
163+ geod_pre();
164+ geod_for();
165+ } else emess(1,"incomplete geodesic/arc info");
166+ if ((n_alpha = pj_param(NULL,start, "in_A").i) > 0) {
167+ if (!(del_alpha = pj_param(NULL,start, "rdel_A").f))
168+ emess(1,"del azimuth == 0");
169+ } else if ((del_S = fabs(pj_param(NULL,start, "ddel_S").f)) != 0.) {
170+ n_S = geod_S / del_S + .5;
171+ } else if ((n_S = pj_param(NULL,start, "in_S").i) <= 0)
172+ emess(1,"no interval divisor selected");
173+ }
174+ /* free up linked list */
175+ for (; start; start = curr) {
176+ curr = start->next;
177+ pj_dalloc(start);
178+ }
179+}
180+
181+#endif
182+
--- trunk/gpx2shp/configure.ac (revision 22)
+++ trunk/gpx2shp/configure.ac (revision 23)
@@ -2,8 +2,8 @@
22 # Process this file with autoconf to produce a configure script.
33
44 AC_PREREQ(2.57)
5-AC_INIT(gpx2shp, 0.70, hiraoka [@at@] azukimap.jp)
6-AM_INIT_AUTOMAKE(gpx2shp, 0.70)
5+AC_INIT(gpx2shp, 0.71, hiraoka [@at@] azukimap.jp)
6+AM_INIT_AUTOMAKE(gpx2shp, 0.71)
77 AC_CONFIG_SRCDIR(src/main.c)
88 AM_CONFIG_HEADER(src/config.h)
99
@@ -24,13 +24,19 @@
2424 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage")
2525
2626 # Checks for libraries.
27-AC_CHECK_LIB(proj, pj_param)
28-AC_CHECK_LIB(expat, XML_SetUserData)
29-AC_CHECK_LIB(m, cos)
27+AC_CHECK_LIB(proj, pj_param, [], [AC_MSG_ERROR("proj is not available.")])
28+AC_CHECK_LIB(expat, XML_SetUserData, [], [AC_MSG_ERROR("expat is not available.")])
29+AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR("m is not available.")])
3030
31+AC_CHECK_LIB(
32+ proj,
33+ pj_get_spheroid_defn,
34+ [AC_DEFINE([IS_PROJ_NEW], [],[proj4 version is 1.8 or later])],
35+ [AC_DEFINE([IS_PROJ_OLD], [],[proj4 version is lower than 1.7])]
36+)
37+
3138 # Checks for header files.
3239 AC_HEADER_STDC
33-AC_CHECK_HEADERS(limits.h stdlib.h string.h unistd.h)
3440
3541 # Checks for typedefs, structures, and compiler characteristics.
3642 AC_C_CONST
Show on old repository browser