On Wed, May 14, 2008 at 6:50 AM, Xavier <shiningxc@gmail.com> wrote:
On Wed, May 14, 2008 at 1:16 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
Can we add a check on the libarchive version number when configuring pacman. You can run configure without a problem with a libarchive 1.x version but not actually complete the build. See http://bbs.archlinux.org/viewtopic.php?pid=367593
I know next to nothing about libarchive so I am giving this to someone else to take care of!
I doubt many ppl are still trying to build pacman with libarchive 1.x. Yeah, one did but well.. But in any cases, I am curious to know how to check version number at configure time. I don't know how to do it either. Though I believe I know one way to prevent the specific error that user was having. We could replace this stuff in configure.ac : # Check for libarchive AC_CHECK_LIB([archive], [archive_read_data], , AC_MSG_ERROR([libarchive is needed to compile pacman!])) by this : # Check for libarchive AC_CHECK_LIB([archive], [archive_read_open_filename], , AC_MSG_ERROR([libarchive is needed to compile pacman!]))
What I don't know is when this read_open_filename function was introduced. And also what is the oldest libarchive version with which pacman is guaranteed to work.
I would suggest someone grab the last libarchive 1.X release and the first libarchive 2.X release and compare the header files. See if there is an new function introduced in 2.X that we can use instead to verfiy you are using a new enough version. Of course, while you have that original 2.X package, you might want to verify it actually compiles against it. The only other option looks to be diving into AC_LANG_PROGRAM and writing a test that actually has a valid type declaration? -Dan