Broken configure script
When checking out the repo and running ./autogen.sh it generates a corrupt configure file. The process dies with syntax error near unexpected token ')'. When looking into the file itself it looks like a part is missing or doubled:
[...]
LIBS="-lpopt $LIBS"
else case e in #(
e) with_included_popt="yes" ;;
esac
fi
else case e in #(
e) with_included_popt="yes" ;;
esac
fi,
with_included_popt="yes"
)
LIBS="$save_LIBS"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use included popt" >&5
[...]
The syntax-error is the closing bracket right above LIBS="$save_LIBS". Additionally the else cases are doubled. Unfortunately I have no idea why autogen.sh messes it up. I am running on Arch, but got the same error when trying with Debian 12.
Hello, it seems I am a bit further than you. there is this discussion: https://news.ycombinator.com/item?id=45001909 where I found this repository. Some patches are available at https://aur.archlinux.org/packages/pilot-link-git I have applied the patches manually (easy): diff --git a/configure.ac b/configure.ac index 71459d08..6a6584ad 100644 --- a/configure.ac +++ b/configure.ac @@ -63,8 +63,8 @@ AC_SUBST(PISYNC_AGE) dnl Eat -Werror so configure will run properly, if the user provided it enable_werror=no save_CFLAGS="$CFLAGS" -CFLAGS=$(echo $save_CFLAGS | sed -e s/-Werror//g) -CXXFLAGS=$(echo $save_CXXFLAGS | sed -e s/-Werror//g) +CFLAGS=$(echo "$save_CFLAGS" | sed -e 's/-Werror[^=]//g') +CXXFLAGS=$(echo "$save_CXXFLAGS" | sed -e 's/-Werror[^=]//g') if test "x$CFLAGS" != "x$save_CFLAGS"; then dnl -Werror was set; treat it as implicit --enable-werror below enable_werror="yes" @@ -392,11 +392,8 @@ if test "x$enable_conduits" != "xno"; then dnl Determine if system popt is good enough save_LIBS="$LIBS" AC_CHECK_HEADER(popt.h,
-
AC_CHECK_DECL(POPT_BIT_SET, -
AC_CHECK_LIB(popt, poptStrippedArgv,, -
[with_included_popt="yes"]), -
[with_included_popt="yes"], -
[#include <popt.h>]),
-
AC_CHECK_LIB(popt, poptStrippedArgv,, -
[with_included_popt="yes"]), [with_included_popt="yes"] ) LIBS="$save_LIBS"
diff --git a/src/pilot-dlpsh.c b/src/pilot-dlpsh.c index afbe5da4..24982059 100644 --- a/src/pilot-dlpsh.c +++ b/src/pilot-dlpsh.c @@ -389,7 +389,7 @@ int time_fn(int sd, int argc, const char *argv[])
strftime(timebuf, 80, "Now setting Palm time from desktop to: "
"%a %b %d %H:%M:%S %Z %Y\n", tm_ptr);
-
printf(timebuf);
-
printf("%s", timebuf); gettimeofday(&tv, 0); ltime = tv.tv_sec + 1; usleep(1000000 - tv.tv_usec);
diff --git a/src/pilot-hinotes.c b/src/pilot-hinotes.c index a0336dc6..40ccf204 100644 --- a/src/pilot-hinotes.c +++ b/src/pilot-hinotes.c @@ -79,9 +79,7 @@ void write_memo_mbox(struct PilotUser User, struct HiNoteNote m, printf("...\n"); else printf("\n");
-
printf("\n"); -
printf(m.text); -
printf("\n");
-
printf("\n%s\n", m.text);
}
void write_memo_in_directory(char *dirname, struct HiNoteNote m, diff --git a/src/pilot-read-todos.c b/src/pilot-read-todos.c index 5fe9f490..f258614c 100644 --- a/src/pilot-read-todos.c +++ b/src/pilot-read-todos.c @@ -217,7 +217,7 @@ int main(int argc, const char *argv[]) } else { if (pi_file_read_record
-
(pif, i, (void *) &ptr, &len, &attr, &category,
-
(pif, i, (void *) &ptr, (size_t *) &len, &attr, &category, 0)) break;
diff --git a/src/pilot-xfer.c b/src/pilot-xfer.c index 25aa05e4..096a93c7 100644 --- a/src/pilot-xfer.c +++ b/src/pilot-xfer.c @@ -2477,8 +2477,7 @@ main(int argc, const char *argv[]) { fprintf(stderr, " ERROR: '%s' is not a directory or does not exist.\n" " Please supply a directory name when performing a "
-
"backup or restore and try again.\n\n", dirname); -
fprintf(stderr,gracias);
-
"backup or restore and try again.\n\n%s", dirname, gracias); return 1; } }
@@ -2487,14 +2486,12 @@ main(int argc, const char *argv[]) case palm_op_list: if (rargc > 0) {
-
fprintf(stderr," ERROR: Do not pass additional arguments to -busrlLC.\n"); -
fprintf(stderr,gracias);
-
fprintf(stderr," ERROR: Do not pass additional arguments to -busrlLC.\n%s", gracias); return 1; } break; case palm_op_noop:
-
fprintf(stderr," ERROR: Must specify one of -bursimfdlC.\n"); -
fprintf(stderr,gracias);
-
fprintf(stderr," ERROR: Must specify one of -bursimfdlC.\n%s", gracias); return 1; break; case palm_op_merge:
I have install dependencies (I am on ubuntu): sudo apt install -y build-essential autoconf automake libtool libtool-bin pkg-config gettext autopoint libpopt-dev
then ./configure make
It seems to compile ok, but I do not find pilot-xfer and pilot-dlpsh. What did I wrong ?
Solved: thanks to https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/pi/pilot-link. I have applied all the patches, then ./configure --enable-conduits It works !