I am trying to compile a package (libdrm-2.4.59) and to use sed and autoreconf to remove a dependency:sed -e /pthread-stubs/d -i configure.ac &&autoreconf -fivIt produces the following output:autoreconf: Entering directory `.'autoreconf: configure.ac: not using Gettextautoreconf: running: aclocal -I /u/f0/students/estermad/tmp/share/aclocal --force -I m4 ${ACLOCAL_FLAGS}autoreconf: configure.ac: tracingautoreconf: running: libtoolize --install --copy --forcelibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.libtoolize: copying file 'build-aux/config.guess'libtoolize: copying file 'build-aux/config.sub'libtoolize: copying file 'build-aux/install-sh'libtoolize: copying file 'build-aux/ltmain.sh'libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.libtoolize: copying file 'm4/libtool.m4'libtoolize: You should add the contents of 'm4/libtool.m4' to 'aclocal.m4'.libtoolize: copying file 'm4/ltoptions.m4'libtoolize: You should add the contents of 'm4/ltoptions.m4' to 'aclocal.m4'.libtoolize: copying file 'm4/ltsugar.m4'libtoolize: You should add the contents of 'm4/ltsugar.m4' to 'aclocal.m4'.libtoolize: copying file 'm4/ltversion.m4'libtoolize: copying file 'm4/lt~obsolete.m4'libtoolize: You should add the contents of 'm4/lt~obsolete.m4' to 'aclocal.m4'.autoreconf: running: /usr/bin/autoconf --forceautoreconf: running: /usr/bin/autoheader --forceautoreconf: running: automake --add-missing --copy --force-missingconfigure.ac:32: installing `build-aux/missing'exynos/Makefile.am: installing `build-aux/depcomp'autoreconf: Leaving directory `.'This looks fine so far but as I call configure the build stops with a strange error:...checking for pkg-config... /u/f0/students/estermad/tmp/bin/pkg-configchecking pkg-config is at least version 0.9.0... yeschecking for PCIACCESS... configure: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59':configure: error: The pkg-config script could not be found or is too old.  Make sure itis in your PATH or set the PKG_CONFIG environment variable to the fullpath to pkg-config....Here are some parts of the config.log which show the error, the corresponding compiler and linker flags which were set correctly and the values related to pkg-config which are not set:configure:12927: checking for PCIACCESSconfigure:12932: $PKG_CONFIG --exists --print-errors pciaccess >= 0.10configure:12935: $? = 0configure:12945: $PKG_CONFIG --exists --print-errors pciaccess >= 0.10configure:12948: $? = 0configure:12970: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59':...ac_cv_env_PCIACCESS_CFLAGS_set=setac_cv_env_PCIACCESS_CFLAGS_value=-I/u/f0/students/estermad/tmp/includeac_cv_env_PCIACCESS_LIBS_set=setac_cv_env_PCIACCESS_LIBS_value='-L/u/f0/students/estermad/tmp/lib -lpciaccess'ac_cv_env_PKG_CONFIG_set=ac_cv_env_PKG_CONFIG_value=The autoreconf uses libtoolize which was missing on my system so I had to build libtool myself. All builds I do on this system have a prefix. The prefix used to build dependencies of libdrm among other things. For libtool I ran following:$ cd libtool-2.4.5$ ./configure --prefix=/u/f0/students/estermad/tmp && make && make install$ libtool --finish /u/f0/students/estermad/tmp/libHowever the build and install of the libtool runs without any errors. I have no idea if the resulting configure-script is corrupted due to autoreconf (located in /usr/bin/autoreconf), libtoolize (located in /u/f0/students/estermad/tmp/bin), aclocal or something different.I tried to build libdrm without using autoreconf, commenting out pthread-stubs manually. The build ran fine. Hence the above stated issue reveals only after running autoreconf. I would really appreciate some useful hints.
Using autoreconf without root rights on a prefix path results in a corrupted configure-script
ubuntu;compiling;autoreconf