0

When I try to run ./configure.ac file with MSYS .sh from the command line with mingw64 compiler, I get the following Error from the ./configure file.

Error:

./configure.ac: line 11: syntax error near unexpected token `[svnversion],'
./configure.ac: line 11: `define([svnversion], esyscmd([sh -c "C:\trunk\bin\run_svnversion_if_it_exists.bash|tr -d '\n'"]))dnl'
sh-4.3$

From this Code:

define([svnversion], esyscmd([sh -c "C:\trunk\bin\run_svnversion_if_it_exists.bash|tr -d '\n'"]))dnl
AC_INIT([oomph-lib],[1.0.svnversion],[***@contact])

Is there another way to define SVN version or call it from the bash file?

shellter
  • 36,525
  • 7
  • 83
  • 90
Juniar
  • 1,269
  • 1
  • 15
  • 24

1 Answers1

3

No, configure.ac is a not a Bash script. Note that configure.ac is different from configure because it ends with .ac. If whatever project you are trying to compile has a configure script, that should be a Bash script that you can run. If it only has configure.ac, you have to run some arcane series of GNU autotools commands to generate a configure script from it (e.g. autoconf, autoreconf). Look at the documentation for your that project to figure out what commands to run.

David Grayson
  • 84,103
  • 24
  • 152
  • 189
  • 1
    `make configure` or `sh autogen.sh` are commands I see often to create the `configure` script. – pfnuesel Jul 22 '17 at 10:57
  • @pfnuesel "make configure.ac" is the command and the file I was trying to run after running sh autogen.sh. Whereby sh suggest if I want to run a test script like; make check -k. Is there another configure file I am missing? or that I need to run before running .ac file? – Juniar Jul 22 '17 at 16:23
  • @David I am using Windows with Msys2. Can I use autoconf on Windows? and also this is a configure.ac file not a Makefile.am. Both are included, however which one should I run with "sh autogen.sh". Is it configure.ac or Makefile.am? – Juniar Jul 22 '17 at 16:29
  • MSYS2 has a package with autoconf in it. I think you will have to post a link to the project you are compiling if you want any further help. – David Grayson Jul 22 '17 at 17:03
  • It is Msys64. So I just need to call nmake -f Makefile.am to generate the configure files? What file type/extension gets generated with autoconf? What about autogen.sh? – Juniar Jul 22 '17 at 17:10
  • You can read the autoconf manual or finally post a link to the software you are trying to compile. – David Grayson Jul 22 '17 at 17:11
  • Thanks. What about autogen.sh file. When do I need to run this? – Juniar Jul 22 '17 at 17:14
  • Why not post a link to the software you are trying to compile so I can try it myself instead of speculating about how it is set up? – David Grayson Jul 22 '17 at 17:16
  • It takes time to download. I never thought you could, but here is the link with the installation instructions : http://www.maths.manchester.ac.uk/~mheil/doc/the_distribution/html/index.html – Juniar Jul 22 '17 at 17:38
  • OK, so you ran `svn checkout svn://oomph-lib.maths.man.ac.uk/release/trunk` to get the software? – David Grayson Jul 22 '17 at 19:48
  • There shouldn't be so much guessing involved. Your first post should have contained the link to the software. After being asked three times, all you provide is a link to a place with multiple download options. – David Grayson Jul 22 '17 at 19:59
  • As I said in my answer, you should look in the documentation of the project to see how to build it. This project seems to be nicely documented, so you should start here: http://www.maths.manchester.ac.uk/~mheil/doc/the_distribution/html/index.html#install Now, unless they specifically tested their software on MSYS2, there will be lots of little issues that you have to fix one at a time, which is outside the scope of your original question. One MSYS2 tip: you should do is supply `--build=$CHOST --host=$CHOST` options to `configure` when you run it. – David Grayson Jul 22 '17 at 20:19
  • Sorry, I pointed to where I was following the Installation instructions provided. However that is right svn checkout. Plus they only have one release, however you can unzip the tar files, an option. That is correct unless they tested the software on MSYS64 you will have bugs to fix. Did you check if the configure.ac file is okay? – Juniar Jul 22 '17 at 22:50
  • 1
    I got it, The problem is that MSYS comes with many shells. And I was on msys $ sh shell as described on their Installation guide. However this shell cannot prompt mingw64 compiler to run the script. Then I ran the autogen.sh on mingw64 shell and is now responding very well. Anyway thank you. – Juniar Jul 23 '17 at 00:35